Hostname: page-component-cd9895bd7-7cvxr Total loading time: 0 Render date: 2024-12-24T01:35:18.262Z Has data issue: false hasContentIssue false

Automatic music composition using answer set programming

Published online by Cambridge University Press:  22 February 2011

GEORG BOENN
Affiliation:
Cardiff School of Creative and Cultural Industries, University of Glamorgan, Pontypridd, CF37 1DL, UK (e-mail: [email protected])
MARTIN BRAIN
Affiliation:
Department of Computer Science, University of Bath, Bath, BA2 7AY, UK (e-mail: [email protected], [email protected], [email protected])
MARINA DE VOS
Affiliation:
Department of Computer Science, University of Bath, Bath, BA2 7AY, UK (e-mail: [email protected], [email protected], [email protected])
JOHN FFITCH
Affiliation:
Department of Computer Science, University of Bath, Bath, BA2 7AY, UK (e-mail: [email protected], [email protected], [email protected])

Abstract

Music composition used to be a pen and paper activity. These days music is often composed with the aid of computer software, even to the point where the computer composes parts of the score autonomously. The composition of most styles of music is governed by rules. We show that by approaching the automation, analysis and verification of composition as a knowledge representation task and formalising these rules in a suitable logical language, powerful and expressive intelligent composition tools can be easily built. This application paper describes the use of answer set programming to construct an automated system, named Anton, that can compose melodic, harmonic and rhythmic music, diagnose errors in human compositions and serve as a computer-aided composition tool. The combination of harmonic, rhythmic and melodic composition in a single framework makes Anton unique in the growing area of algorithmic composition. With near real-time composition, Anton reaches the point where it can not only be used as a component in an interactive composition tool but also has the potential for live performances and concerts or automatically generated background music in a variety of applications. With the use of a fully declarative language and an “off-the-shelf” reasoning engine, Anton provides the human composer a tool which is significantly simpler, more compact and more versatile than other existing systems.

Type
Regular Papers
Copyright
Copyright © Cambridge University Press 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

References

Allen, J. F. 1983. Maintaining knowledge about temporal intervals. CACM 26, 198203.CrossRefGoogle Scholar
Anders, T. 2007. Composing Music by Composing Rules: Design and Usage of a Generic Music Constraint System. PhD thesis, Queen's University, Belfast, Department of Music.Google Scholar
Arom, S. 1991. African Polyphony and Polyrhythm. Cambridge University Press, Cambridge, UK.CrossRefGoogle Scholar
Baral, C. 2003. Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press, Cambridge, UK.CrossRefGoogle Scholar
Baral, C. and Gelfond, M. 2000. Reasoning agents in dynamic domains. In Logic-based Artificial Intelligence, Minker, J., Ed. Kluwer Academic, 257279.CrossRefGoogle Scholar
Bel, B. 1998. Migrating musical concepts: An overview of the Bol processor. Computer Music Journal 22, 2, 5664.CrossRefGoogle Scholar
Boenn, G. 2007. Composing rhythms based upon Farey sequences. In Digital Music Research Network Conference, Gibson, I., Stansbie, A., Stavropoulos, N., Eds.Google Scholar
Boenn, G. 2008. The importance of Husserl's phenomenology of internal time-consciousness for music analysis and composition. In Proc. of the ICMC 2008. Scholarly Publishing Office of the University of Michigan Library. vol. 2008. Belfast.Google Scholar
Boenn, G. 2009. Automated Analysis and Transcription of Rhythm Data and their Use for Composition. PhD thesis, University of Bath, Bath, UK.Google Scholar
Boenn, G., Brain, M., De Vos, M. and Ffitch, J. 2008. Automatic composition of melodic and harmonic music by answer set programming. In International Conference on Logic Programming, ICLP08. Lecture Notes in Computer Science, vol. 4386. Springer, Berlin/Heidelberg, 160174.CrossRefGoogle Scholar
Boulanger, R., Ed. 2000. The Csound Book: Tutorials in Software Synthesis and Sound Design. MIT Press, Cambridge, MA.Google Scholar
Brain, M., Cliffe, O. and De Vos, M. 2009. A pragmatic programmer's guide to answer set programming. In Proc of the 2nd Workshop of Software Engineering for Answer Set Programming (SEA'09), De Vos, Marina and Schaub, T., Eds. 49–63.Google Scholar
Brain, M., Crick, T., De Vos, M. and Fitch, J. 2006. TOAST: Applying answer set programming to superoptimisation. In International Conference on Logic Programming, Etalle, S. and Truszcynski, M., Eds. 270284. LNCS, Springer.CrossRefGoogle Scholar
Brain, M., De Vos, M. and Satoh, K. 2007a. Smodels-IE: Improving the cache utilisation of smodels. In Proc. of the 4th Workshop on Answer Set Programming: Advances in Theory and Implementation, Costantini, S. and Watson, R., Eds. Porto, Portugal, 309313.Google Scholar
Brain, M., Gebser, M., Pührer, J., Schaub, T., Tompits, H. and Woltran, S. 2007b. “That is illogical captain!”—The debugging support tool spock for answer-set programs: System description. In Proc. of the Workshop on Software Engineering for Answer Set Programming (SEA'07), De Vos, M. and Schaub, T., Eds. CEUR, vol. 281. 7185.Google Scholar
Brothwell, A. and ffitch, J. 2008. An automatic blues band. In 6th International Linux Audio Conference, Barknecht, F. and Rumori, M., Eds. Tribun EU, Brno, Czech Republic, Kunsthochscule für Medien Köln, 1217.Google Scholar
Buccafurri, F. and Caminiti, G. 2005. A social semantics for multi-agent systems. In LPNMR, Baral, C., Greco, G., Leone, N. and Terracina, G., Eds. Lecture Notes in Computer Science, vol. 3662. Springer, 317329.Google Scholar
Buccafurri, F. and Gottlob, G. 2002. Multiagent compromises, joint fixpoints, and stable models. In Computational Logic: Logic Programming and Beyond, Essays in Honour of Robert A. Kowalski, Part I, Kakas, A. C. and Sadri, F., Eds. Lecture Notes in Computer Science, vol. 2407. Springer, 561585.Google Scholar
Chuang, J. 1995. Mozart's Musikalisches Würfelspiel. URL: http://sunsite.univie.ac.at/Mozart/dice/.Google Scholar
Cliffe, O., De Vos, M., Brain, M. and Padget, J. 2008. ASPVIZ: Declarative visualisation and animation using answer set programming. In Logic Programming, de la Banda, M. Garcia and Pontelli, E., Eds. Lecture Notes in Computer Science. Springer, Berlin/Heidelberg, 724728.CrossRefGoogle Scholar
Cliffe, O., De Vos, M. and Padget, J. 2006. Specifying and analysing agent-based social institutions using answer set programming. In Selected revised papers from the workshops on Agent, Norms and Institutions for Regulated Multi-Agent Systems (ANIREM) and Organizations and Organization Oriented Programming (OOOP) at AAMAS'05, Boissier, O., Padget, J., Dignum, V., Lindemann, G., Matson, E., Ossowski, S., Sichman, J. and Vazquez-Salceda, J., Eds. LNCS, vol. 3913. Springer-Verlag, Berlin, 99113.Google Scholar
Cope, D. 2006. A musical learning algorithm. Computer Music Journal 28, 3 (Fall), 1227.CrossRefGoogle Scholar
de la Motte, D. 1981. Kontrapunkt. dtv/Bärenreiter, München.Google Scholar
De Vos, M. and Vermeir, D. 1999. Choice logic programs and Nash equilibria in strategic games. In Computer Science Logic (CSL'99), Flum, J. and Rodríguez-Artalejo, M., Eds. Lecture Notes in Computer Science, vol. 1683. Springer-Verlag, Madrid, Spain, 266276.CrossRefGoogle Scholar
De Vos, M. and Vermeir, D. 2004. Extending answer sets for logic programming agents. Annals of Mathematics and Artifical Intelligence 42, 1–3 (Sept.), 103139. Special Issue on Computational Logic in Multi-Agent Systems.CrossRefGoogle Scholar
Ebcioğlu, K. 1986. An Expert System for Harmonization of Chorales in the Style of J.S. Bach. PhD thesis, State University of New York, Buffalo, Department of Computer Science.Google Scholar
Eiter, T., Faber, W., Leone, N. and Pfeifer, G. 1999. The diagnosis frontend of the DLV system. AI Communications 12, 1–2, 99111.Google Scholar
Eiter, T., Faber, W., Leone, N., Pfeifer, G. and Polleres, A. 2002. The DLVK planning system. In European Conference, JELIA 2002, Flesca, S., Greco, S., Leone, N. and Ianni, G., Eds. LNAI, vol. 2424. Springer Verlag, Cosenza, Italy, 541544.Google Scholar
Eiter, T., Leone, N., Mateis, C., Pfeifer, G. and Scarcello, F. 1998. The KR system DLV: Progress report, comparisons and benchmarks. In KR'98: Principles of Knowledge Representation and Reasoning, Cohn, A. G., Schubert, L. and Shapiro, S. C., Eds. Morgan Kaufmann, San Francisco, California, 406417.Google Scholar
Erdem, E., Lifschitz, V., Nakhleh, L. and Ringe, D. 2003. Reconstructing the evolutionary history of indo-european languages using answer set programming. In PADL, Dahl, V. and Wadler, P., Eds. LNCS, vol. 2562. Springer, 160176.Google Scholar
Erdem, E., Lifschitz, V. and Ringe, D. 2006. Temporal phylogenetic networks and logic programming. TPLP 6, 5, 539558.Google Scholar
Fux, J. 1965, orig 1725. The Study of Counterpoint from Johann Joseph Fux's Gradus ad Parnassum. W. W. Norton & Company.Google Scholar
Gebser, M., Kaufmann, B., Neumann, A. and Schaub, T. 2007. Conflict-driven answer set solving. In Proc. of the 20th International Joint Conference on Artificial Intelligence (IJCAI'07), Veloso, M., Ed. AAAI Press/MIT Press, 386392. URL: http://www.ijcai.org/papers07/contents.php.Google Scholar
Gebser, M., Schaub, T. and Thiele, S. 2007. GrinGo: A new grounder for answer set programming. In Proc. of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'07), Baral, C., Brewka, G. and Schlipf, J., Eds. Lecture Notes in Artificial Intelligence, vol. 4483. Springer-Verlag, Berlin, 266271.CrossRefGoogle Scholar
Gelfond, M. and Lifschitz, V. 1988. The stable model semantics for logic programming. In Logic Programming, Proc. of the 5th International Conference and Symposium, Kowalski, R. A. and Bowen, K. A., Eds. MIT Press, Seattle, Washington, 10701080.Google Scholar
Gelfond, M. and Lifschitz, V. 1991. Classical negation in logic programs and disjunctive databases. New Generation Computing 9, 3–4, 365386.CrossRefGoogle Scholar
Giunchiglia, E., Lierler, Y. and Maratea, M. 2004. SAT-based answer set programming. In Proc. of the 18th National Conference on Artificial Intelligence (AAAI-04), McGuinness, D. L. and Ferguson, G., Eds. AAAI Press/The MIT Press, 6166.Google Scholar
Goranko, V., Montanari, A. and Sciavicco, G. 2003. A road map on interval temporal logics and duration calculi. Journal of Applied Non-Classical Logics 14, 954.CrossRefGoogle Scholar
Grell, S., Schaub, T. and Selbig, J. 2006. Modelling biological networks by action languages via answer set programming. In Proc. of the International Conference on Logic Programming (ICLP'06), Etalle, S. and Truszczyński, M., Eds. LNCS, vol. 4079. Springer-Verlag, Berlin, 285299.Google Scholar
Gressmann, J., Janhunen, T., Mercer, R., Schaub, T., Thiele, S. and Tichy, R. 2005. Platypus: A platform for distributed answer set solving. In Proc. of the 8th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR'05), Baral, C., Greco, G., Leone, N. and Terracina, G., Eds. 227–239.Google Scholar
Hajdu, G. 1993. Low energy and equal spacing. The multifactorial evolution of tuning systems. Interface 22, 319333.CrossRefGoogle Scholar
Hardy, G. and Wright, E. 1938. An Introduction to the Theory of Numbers, 4th ed.Oxford University Press, Oxford.Google Scholar
Konczak, K. 2006. Voting theory in answer set programming. In Proc. of the Twentieth Workshop on Logic Programming (WLP'06), Fink, M., Tompits, H. and Woltran, S., Eds. No. INFSYS RR-1843-06-02 in Technical Report Series. Technische Universität Wien, Vienna, 4553.Google Scholar
Leach, J. L. 1999. Algorithmic Composition and Musical Form. PhD thesis, University of Bath, School of Mathematical Sciences, Bath, UK.Google Scholar
Lewis, G. E. 2000. Too many notes: Computers, complexity and culture in voyager. Leonardo Music Journal 10, 3339.CrossRefGoogle Scholar
Lierler, Y. 2008. Abstract answer set solvers. In ICLP '08: Proc. of the 24th International Conference on Logic Programming. Springer-Verlag, Berlin/Heidelberg, 377391.Google Scholar
Lierler, Y. and Maratea, M. 2004. Cmodels-2: SAT-based answer set solver enhanced to non-tight programs. In Proc. of the 7th International Conference on Logic Programming and Nonmonotonic Reasoning, LNCS, vol. 2923. Springer, 346350.Google Scholar
Lifschitz, V. 2002. Answer set programming and plan generation. Journal of Artificial Intelligence 138, 1–2, 3954.CrossRefGoogle Scholar
Mileo, A. and Schaub, T. 2006. Extending ordered disjunctions for policy enforcement: Preliminary report. In Proc. of the International Workshop on Preferences in Logic Programming Systems (PREFS'06), Pontelli, E. and Son, T., Eds. 45–59.Google Scholar
Niemelä, I. and Simons, P. 1997. Smodels: An implementation of the stable model and well-founded semantics for normal LP. In Proc. of the 4th International Conference on Logic Programing and Nonmonotonic Reasoning, Dix, J., Furbach, U. and Nerode, A., Eds. LNAI, vol. 1265. Springer, Berlin, 420429.CrossRefGoogle Scholar
Niemelä, I., Simons, P. and Soininen, T. 1999. Stable model semantics of weight constraint rules. In LPNMR, Gelfond, M., Leone, N. and Pfeifer, G., Eds. Lecture Notes in Computer Science, vol. 1730. Springer, 317331.Google Scholar
Padovani, L. and Provetti, A. 2004. Qsmodels: ASP planning in interactive gaming environment. In JELIA, Alferes, J. J. and Leite, J. A., Eds. Lecture Notes in Computer Science, vol. 3229. Springer, 689692.Google Scholar
Partch, H. 1979. Genesis of a Music. Da Capo Press, New York.Google Scholar
Rohrmeier, M. 2006. Towards Modelling Harmonic Movement in Music: Analysing Properties and Dynamic Aspects of pc set Sequences in Bach's Chorales. Tech. Rep. DCRR-004, Darwin College, University of Cambridge.Google Scholar
Soininen, T. and Niemelä, I. 1999. Developing a declarative rule language for applications in product configuration. In Proc. of the First International Workshop on Practical Aspects of Declarative Languages (PADL '99), LNCS. Springer, San Antonio, Texas, 305319.Google Scholar
Syrjänen, T. and Niemelä, I. 2001. The smodels system. In Proc. of the 6th International Conference on Logic Programming and Nonmonotonic Reasoning, Eiter, T., Faber, W. and Truszczynski, M., Eds. Lecture Notes in Computer Science 2173 Springer, 434438.Google Scholar
Thakar, M. 1990. Counterpoint. Yale University Press, New Haven, Connecticut.Google Scholar
Ward, J. and Schlipf, S. 2004. Answer set programming with clause learning. In Proc. of the 7th International Conference on Logic Programming and Nonmonotonic Reasoning, Lifschitz, V. and Niemelä, I., Eds. LNCS, vol. 2923. Springer, 302313.Google Scholar
Xenakis, I. 1992. Formalized Music. Bloomington Press, Stuyvesant, NY, USA.Google Scholar