scieee Open visual document viewer

Android app for automatic music composition

Nieto, Marina S.,Barbancho-Pérez, Ana María,Barbancho-Pérez, Isabel,Tardón-García, Lorenzo José

Abstract

In this contribution, we present an Android App that generates music automatically replicating a specific contemporary genre, specifically rock music. The composition system is based on the analysis of a set of songs of the desired genre. The analysis results the automatic composition algorithm requires are exported to a JSON file that can be readily imported and parsed. The Android App developed creates a symbolic representation of the music generated for drums, bass and rhythm guitar that can be exported to a MIDI file or audio waveform. The evaluation results show that the automatic compositions generated are not distinguished amongst other excerpts created by human composers.

Full text

ANDROID APP FOR AUTOMATIC MUSIC COMPOSITION Ma ina S. Nie o Ana M. Ba bancho Isabel Ba bancho Lo enzo J. Ta d´ on ATIC Resea ch G oup, Dp o. Ingenie ´ ıa de Comunicaciones, E.T.S.I. Telecomunicaci´ on, Uni e sidad de M´ alaga, Andaluc´ ıa Tech, Campus Uni e si a io de Tea inos s/n, 29071, M´ alaga, Spain [email p o ec ed], [email p o ec ed], [email p o ec ed], [email p o ec ed] ABSTRACT In his con ibu ion, we p esen an And oid App ha gene - a es music au oma ically eplica ing a speci ic con empo- a y gen e, speci ically ock music. The composi ion sys- em is based on he analysis o a se o songs o he desi ed gen e. The analysis esul s he au oma ic composi ion al- go i hm equi es a e expo ed o a JSON ile ha can be eadily impo ed and pa sed. The And oid App de eloped c ea es a symbolic ep esen a ion o he music gene a ed o d ums, bass and hy hm gui a ha can be expo ed o a MIDI ile o audio wa e o m. The e alua ion esul s show ha he au oma ic composi ions gene a ed a e no dis in- guished amongs o he exce p s c ea ed by human com- pose s. 1. INTRODUCTION Since he beginning o he compu e a ea, he e has been a g owing in e es on he c ea ion o a by machines. Many musicians and compose s ha e used ma hema ical me h- ods and se s o ules o c ea e musical pieces, in ac , al- go i hmic composi ion could be de ined as he employ- men o a se o ules ha combines musical elemen s o o m a music piece [1], [2], [3]. In his con ibu ion, we use a p obabilis ic model o he cha ac e iza ion o music lea ned om music samples [2]. A e he musical model is lea ned, a music composi o ha ollows he ules in [2] is implemen ed o And oid de ices. Ou composi o gen- e a es new ock music exce p s wi h h ee di e en ins u- men s: d ums, bass and hy hmic gui a . 2. SYSTEM DESCRIPTION The s uc u e o he And oid App o au oma ic music composi ion de eloped is shown in Fig. 1. In his igu e, i can be seen ha he de eloped sys em cosis s o wo di - e en pa s: analysis and pa e n c ea ion s age and com- posi ion sys em. The i s one was implemen ed in Ma lab and he second one o And oid de ices in o de o c ea e a mobile applica ion. c Ma ina S. Nie o, Ana M. Ba bancho, Isabel Ba bancho, Lo enzo J. Ta d´ on. Licensed unde a C ea i e Commons A ibu ion 4.0 In e na ional License (CC BY 4.0). A ibu ion: Ma ina S. Nie o, Ana M. Ba bancho, Isabel Ba bancho, Lo enzo J. Ta d´ on. “And oid App o au oma ic music composi ion”, 19 h In e na ional Socie y o Music In- o ma ion Re ie al Con e ence, Pa is, F ance, 2018. T aining Da ase Analysis and Pa e n C ea ion Composi ion sys em Pa ame e s selec ed by he use Ou pu Song JSON ile Figu e 1. Au oma ic music composi ion scheme. 2.1 Analysis and pa e n c ea ion Among he di e en possible musical gen es, ock was se- lec ed. The inpu o he analysis and pa e n segmen a ion subsys em is a da ase wi h 25 songs belonging o he clas- sical ock music gen e. Each song in he da ase , is cha ac- e ized by h ee MIDI iles, one o each o he ins umen s conside ed in he au oma ic music compose (d ums, bass and hy hm gui a ). The analysis and pa e n disco e y is ca ied ou by implemen ing a speci ic ool in Ma lab which is a modi ica ion o he one desc ibed in [2], o in- clude cho d pa e ns. Cho d pa e ns a e needed in o de o compose music o d ums and hy hm gui a . Fig. 2 shows a schema ic o he analysis and pa e n c ea ion subsys em. T aining Da ase Res s inclusion Ba segmen a ion JSON ile Pa e nDa abase Rhy hmic pa e ns Pi ch pa e ns Cho d pa e ns Figu e 2. Analysis and pa e n c ea ion subsys em. Th ee di e en ypes o pa e ns a e lea ned, wi h each indi idual pa e n co esponding o a ba : hy hmic pa - e ns: du a ion o he no es in bea s; pi ch pa e ns: pi ch con ou in o ma ion; and cho d pa e ns: no es sounding simul aneously o each o he hy hmic igu es. Cho d pa e ns cons i u e a new addi ion wi h espec o he ap- p oach in [2]. I mus be said ha d ums a e conside ed no uned ins umen s and he cho d pa e ns o d ums sound a each bea . 2.2 Composi ion sys em The composi ion sys em i s pe o ms he selec ion o he hy hmic s uc u es. The hy hmic s uc u es las ou ba s and hey a e andomly selec ed be ween among he ollow- ing: AAAA, ABAB, ABBA, AABB, AABC, ABCA and ABCD. The leng h o inal composi ions a e a combina- ion o hese ou -ba s uc u es. Once he gene al hy h- mic s uc u es a e de ined, he ack o each ins umen is gene a ed. Each ins umen is ea ed in a sligh ly di e - en way due o he di e ences be ween d ums, bass and hy hmic gui a . In all ins umen , i s hy hmic, pi ch and cho d pa e ns a e selec ed. The selec ions a e made in a p obabilis ic way [2] wi h he ollowing pa icula i ies o each ins umen : •D um ack gene a ion: since d ums a e no uned ins umen s, cho ds a e simply mapped in o a d um ki . •Bass ack gene a ion: he pi ch is co ec ed in o de o i he melody o he cho d p og ession gene a ed. •Rhy hmic gui a ack gene a ion: pi ch and cho d a e co ec ed in o de o i gui a and bass. 3. ANDROID APP INTERFACE The main sc een o he de eloped applica ion is p esen ed in Fig. 4. This sc een shows he use op ions: he use can selec he ins umen (s) o include in he composi ion: d ums, bass, gui a ; key: majo o mino ; empo in bpm, om 110 o 150 bpm); and composi ion leng h: 4 ba s o comple e song wi h he s uc u e shown in 3. Once he composi ion pa ame e s a e selec ed, he use mus p ess he bu on w i e song. A e he song is com- posed, i can be played in he phone o expo ed ia e-mail (MIDI ile) o Wha sApp (*.wa ile). In oduc ion (4 ba s) Ve se (8 ba s) Cho us (8 ba s) Ve se (8 ba s) Cho us (8 ba s) Figu e 3. Song s uc u e. 4. SYSTEM EVALUATION A su ey has been designed o e alua e he quali y o he au oma ic compose . The su ey includes h ee ques ions, o each ques ion, h ee di e en music exce p s a e con- side ed: wo o hem a e ex ac ed om popula ock songs and he emaining one was composed by he applica ion desc ibed. The pa icipan s a e eques ed o iden i y he exce p s ha in hei opinion was c ea ed by an au oma ic composi ion algo i hm. A ou h possible choice is al- lowed: ”I don’ know”. The su ey also inqui es whe he he subjec s ecognized any o he songs and, in such case, iden i y hem in o de o e alua e i he pa icipan s musi- cal knowledge a ec ed hei answe s. A o al o 97 people answe ed he su ey; he esul s a e shown in Table 1. As i can be seen om he esul s, in Figu e 4. And oid App o music composi ion. Iden i ica ion No Iden i ica ion Ques ion 1 47.42 % 52.58 % Ques ion 2 37.11 % 62.89 % Ques ion 3 17.53 % 82.47 % To al 34.02 %65.98 % Table 1. Su ey esul s. he i s ques ion almos hal o he pa icipan s iden i ied he au oma ic compose ; when we e iewed he answe s ega ding he ecogni ion o he exce p s, se e al pa ici- pan s indica ed ha hey ecognized one o he samples in- cluded in ha ques ion, which is consis en wi h he esul s ob ained. 5. CONCLUSIONS An au oma ic music composi ion App has been p esen ed. This App gene a es ock music and includes d um, bass and hy hmic gui a . In he nex mon hs i will be published in he Google Play S o e. A subjec i e e alua ion shows ha he exce p s c ea ed a e no dis inguished amongs o h- e s c ea ed by human compose s. 6. ACKNOWLEDGEMENTS This wo k has been unded by he Minis e io de Economa y Compe i i idad o he Spanish Go e nmen unde P ojec No. TIN2016-75866-C3-2-R. The wo k has been done a Uni e sidad de Mlaga, Campus de Excelencia In e na- cional Andaluca Tech. 7. REFERENCES [1] D. Cope. Algo i hmic composi ion [ e]de ined. In Panel Discussion in ICMC P oceedings, pages 23–25, 1993. [2] C. Roig, L.J. Ta don, I. Ba bancho, and A.M. Ba - bancho. Au oma ic melody composi ion based on a p obabilis ic model o music s yle and ha monic ules. Knowledge-Based Sys ems, (71):419–434, 2014. [3] C. Roig, L.J. Ta don, I. Ba bancho, and A.M. Ba ban- cho. A non-homogeneous bea -based ha mony ma ko model. Knowledge-Based Sys ems, (142):85–94, 2018.