Algorithmic Generation of Music Tunes for an iPhone® Game

  • Adriano Baratè
  • Luca Andrea Ludovico
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7990)


This paper describes an algorithm employable in a game to automatically compose music tunes over a given chord progression. A key feature of our proposal is its efficiency in terms of computational power and resource occupation, which makes it usable in real time within mobile devices such as MP3 players and smart phones. Besides, music themes can be randomized, so that the cyclic repetition of the same chord sequence becomes the base for non-repetitive tunes, different as regards both their melodic contour and their rhythm. Furthermore, the complexity of the generated themes can be modified in real time by setting numeric parameters. A complete C++ implementation of the algorithm is provided.


music algorithms automatic composition 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Mozart, W.A., Norden, H.: Musikalisches Würfelspiel. B. Schott’s Soehne (1957)Google Scholar
  2. 2.
    Schwanauer, S., Levitt, D.: Machine models of music. MIT Press (1993)Google Scholar
  3. 3.
    Xenakis, I.: Formalized Music: Thought and mathematics in composition, vol. (6). Pendragon Pr. (1992)Google Scholar
  4. 4.
    Spector, L., Alpern, A.: Induction and recapitulation of deep musical structure. In: Proceedings of International Joint Conference on Artificial Intelligence, IJCAI, vol. 95, pp. 20–25 (1995)Google Scholar
  5. 5.
    de la Puente, A.O., Alfonso, R.S., Moreno, M.A.: Automatic composition of music by means of grammatical evolution. ACM SIGAPL APL Quote Quad 32(4), 148–155 (2002)CrossRefGoogle Scholar
  6. 6.
    Boenn, G., Brain, M., De Vos, M., Ffitch, J.: Automatic composition of melodic and harmonic music by answer set programming. In: Logic Programming, pp. 160–174 (2008)Google Scholar
  7. 7.
    Lerdahl, F., Jackendoff, R.: A generative theory of tonal music. MIT Press (1983)Google Scholar
  8. 8.
    Messiaen, O.: The technique of my musical language: Text, vol. 1. Alphonse Leduc (1956)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Adriano Baratè
    • 1
  • Luca Andrea Ludovico
    • 1
  1. 1.Laboratorio di Informatica Musicale (LIM), Dipartimento di InformaticaUniversità degli Studi di MilanoMilanItaly

Personalised recommendations