Skip to main content

Automatic Composition of Melodic and Harmonic Music by Answer Set Programming

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5366))

Abstract

The composition of most styles of music is governed by rules. The natural statement of these rules is declarative (“The highest and lowest notes in a piece must be separated by a consonant interval”) and non deterministic (“The base note of a key can be followed by any note in the key”). We show that by approaching the automation and analysis of composition as a knowledge representation task and formalising these rules in a suitable logical language, powerful and expressive intelligent composition tools can easily be built. This paper describes the use of answer set programming to construct an automated system that can compose both melodic and harmonic music, diagnose errors in human compositions and serve as a computer-aided composition tool. The use of a fully declarative language and an “off-the-shelf” reasoning engine allows the creation of tools which are significantly simpler, smaller and more flexible than those produced by existing approaches. It also combines harmonic and melodic composition in a single framework, which is a new feature in the growing area of algorithmic composition.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Chuang, J.: Mozart’s Musikalisches Würfelspiel (1995), http://sunsite.univie.ac.at/Mozart/dice/

  2. Xenakis, I.: Formalized Music. Bloomington Press, Stuyvesant (1992)

    Google Scholar 

  3. Cope, D.: A Musical Learning Algorithm. Computer Music Journal 28(3), 12–27 (Fall, 2006)

    Article  Google Scholar 

  4. Anders, T.: Composing Music by Composing Rules: Design and Usage of a Generic Music Constraint System. Ph.D thesis, Queen’s University, Belfast, Department of Music (2007)

    Google Scholar 

  5. Fux, J.: The Study of Counterpoint from Johann Joseph Fux’s Gradus ad Parnassum. W.W. Norton (1965, orig 1725)

    Google Scholar 

  6. Thakar, M.: Counterpoint. New Haven (1990)

    Google Scholar 

  7. Brothwell, A., Ffitch, J.: An Automatic Blues Band. In: Barknecht, F., Rumori, M. (eds.) 6th International Linux Audio Conference, Kunsthochschule für Medien Köln, LAC 2008, pp. 12–17 (March 2008)

    Google Scholar 

  8. Leach, J.L.: Algorithmic Composition and Musical Form. Ph.D thesis, University of Bath, School of Mathematical Sciences (1999)

    Google Scholar 

  9. Ebcioğlu, K.: An Expert System for Harmonization of Chorales in the Style of J.S. Bach. Ph.D thesis, State University of New York, Buffalo, Department of Computer Science (1986)

    Google Scholar 

  10. Rohrmeier, M.: Towards modelling harmonic movement in music: Analysing properties and dynamic aspects of pc set sequences in Bach’s chorales. Technical Report DCRR-004, Darwin College, University of Cambridge (2006)

    Google Scholar 

  11. Baral, C.: Knowledge Representation, Reasoning and Declarative Problem Solving, 1st edn. Cambridge University Press, Cambridge (2003)

    Book  MATH  Google Scholar 

  12. Gebser, M., Schaub, T., Thiele, S.: GrinGo: A New Grounder for Answer Set Programming. In: Baral, C., Brewka, G., Schlipf, J.S. (eds.) LPNMR 2007. LNCS, vol. 4483, pp. 266–271. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  13. Syrjänen, T.: Lparse 1.0 User’s Manual. Helsinki University of Technology (2000)

    Google Scholar 

  14. Gebser, M., Kaufmann, B., Neumann, A., Schaub, T.: Conflict-Driven Answer Set Solving. In: Proceeding of IJCAI 2007, pp. 386–392 (2007)

    Google Scholar 

  15. Syrjänen, T., Niemelä, I.: The Smodels System. In: Codognet, P. (ed.) ICLP 2001. LNCS, vol. 2237. Springer, Heidelberg (2001)

    Google Scholar 

  16. Lierler, Y., Maratea, M.: Cmodels-2: SAT-based Answer Set Solver Enhanced to Non-tight Programs. In: Lifschitz, V., Niemelä, I. (eds.) LPNMR 2004. LNCS, vol. 2923, pp. 346–350. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  17. Eiter, T., Leone, N., Mateis, C., Pfeifer, G., Scarcello, F.: The KR System dlv: Progress Report, Comparisons and Benchmarks. In: Cohn, A.G., Schubert, L., Shapiro, S.C. (eds.) KR 1998: Principles of Knowledge Representation and Reasoning, pp. 406–417. Morgan Kaufmann, San Francisco (1998)

    Google Scholar 

  18. Eiter, T., Faber, W., Leone, N., Pfeifer, G., Polleres, A.: The DLVK Planning System. In: Flesca, S., Greco, S., Leone, N., Ianni, G. (eds.) JELIA 2002. LNCS (LNAI), vol. 2424, pp. 541–544. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  19. Lifschitz, V.: Answer set programming and plan generation. J. of Artificial Intelligence 138(1-2), 39–54 (2002)

    Article  MathSciNet  MATH  Google Scholar 

  20. Nogueira, M., Balduccini, M., Gelfond, M., Watson, R., Barry, M.: A A-Prolog Decision Support System for the Space Shuttle. In: Answer Set Programming: Towards Efficient and Scalable Knowledge Represenation and Reasoning. American Association for Artificial Intelligence Press, Stanford (March 2001)

    Google Scholar 

  21. Baral, C., Gelfond, M.: Reasoning agents in dynamic domains. In: Logic-based artificial intelligence, pp. 257–279. Kluwer Academic Publishers, Dordrecht (2000)

    Chapter  Google Scholar 

  22. Buccafurri, F., Caminiti, G.: A Social Semantics for Multi-agent Systems. In: Baral, C., Greco, G., Leone, N., Terracina, G. (eds.) LPNMR 2005. LNCS, vol. 3662, pp. 317–329. Springer, Heidelberg (2005)

    Chapter  Google Scholar 

  23. Cliffe, O., De Vos, M., Padget, J.: Specifying and Analysing Agent-based Social Institutions using Answer Set Programming. In: Boissier, O., Padget, J., Dignum, V., Lindemann, G., Matson, E., Ossowski, S., Sichman, J., Vazquez-Salceda, J. (eds.) ANIREM 2005 and OOOP 2005. LNCS, vol. 3913, pp. 99–113. Springer, Heidelberg (2006)

    Google Scholar 

  24. Polleres, A.: Semantic Web Languages and Semantic Web Services as Application Areas for Answer Set Programming. In: Brewka, G., Niemelä, I., Schaub, T., Truszczyński, M. (eds.) Nonmonotonic Reasoning, Answer Set Programming and Constraints, Internationales Begegnungs- und Forschungszentrum für Informatik (IBFI), Schloss Dagstuhl, Germany. Dagstuhl Seminar Proceedings, vol. 05171 (2005)

    Google Scholar 

  25. Ruffolo, M., Leone, N., Manna, M., Saccà, D., Zavatto, A.: Exploiting ASP for Semantic Information Extraction. In: De Vos, M., Provetti, A. (eds.) Answer Set Programming. CEUR Workshop Proceedings, vol. 142, CEUR-WS.org (2005)

    Google Scholar 

  26. Brain, M., Crick, T., De Vos, M., Fitch, J.: TOAST: Applying Answer Set Programming to Superoptimisation. In: International Conference on Logic Programming. LNCS. Springer, Heidelberg (August 2006)

    Google Scholar 

  27. Grell, S., Schaub, T., Selbig, J.: Modelling biological networks by action languages via answer set programming. In: Etalle, S., Truszczyński, M. (eds.) ICLP 2006. LNCS, vol. 4079, pp. 285–299. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  28. Konczak, K.: Voting Theory in Answer Set Programming. In: Fink, M., Tompits, H., Woltran, S. (eds.) Proceedings of the Twentieth Workshop on Logic Programming (WLP 2006). Number INFSYS RR-1843-06-02, Technical Report Series, pp. 45–53. Technische Universität Wien (2006)

    Google Scholar 

  29. Erdem, E., Lifschitz, V., Nakhleh, L., Ringe, D.: Reconstructing the Evolutionary History of Indo-European Languages Using Answer Set Programming. In: Dahl, V., Wadler, P. (eds.) PADL 2003. LNCS, vol. 2562, pp. 160–176. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  30. Boulanger, R. (ed.): The Csound Book. MIT Press, Cambridge (2000)

    Google Scholar 

  31. Bel, B.: Migrating Musical Concepts: An Overview of the Bol Processor. Computer Music Journal 22(2), 56–64 (1998)

    Article  Google Scholar 

  32. Brain, M., De Vos, M., Satoh, K.: Smodels-ie: Improving the Cache Utilisation of Smodels. In: Costantini, S., Watson, R. (eds.) Proceedings of the 4th Workshop on Answer Set Programming, pp. 309–314 (2007)

    Google Scholar 

  33. Ward, J., Schlipf, S.: Answer set programming with clause learning. In: Lifschitz, V., Niemelä, I. (eds.) LPNMR 2004. LNCS, vol. 2923, pp. 302–313. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  34. Brain, M., Gebser, M., Pührer, J., Schaub, T., Tompits, H., Woltran, S.: “That is illogical captain!” – The Debugging Support Tool spock for Answer-Set Programs: System Description. In: De Vos, M., Schaub, T. (eds.) Proceedings of the Workshop on Software Engineering for Answer Set Programming (SEA 2007), pp. 71–85 (2007)

    Google Scholar 

  35. Endrich, A.: Building Musical Relationships. In: Preparation (manuscript, 2008)

    Google Scholar 

  36. Brain, M., De Vos, M.: Implementing OCLP as a Front End for Answer Set Solvers: From Theory to Practice. In: Proceedings of Answer Set Programming: Advances in Theory and Implementation (ASP 2003), Ceur-WS (September 2003)

    Google Scholar 

  37. Boenn, G.: Composing Rhythms Based Upon Farey Sequences. In: Digital Music Research Network Conference (July 2007)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Boenn, G., Brain, M., De Vos, M., ffitch, J. (2008). Automatic Composition of Melodic and Harmonic Music by Answer Set Programming. In: Garcia de la Banda, M., Pontelli, E. (eds) Logic Programming. ICLP 2008. Lecture Notes in Computer Science, vol 5366. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-89982-2_21

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-89982-2_21

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-89981-5

  • Online ISBN: 978-3-540-89982-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics