Skip to main content

Analysing Symbolic Music with Probabilistic Grammars

  • Chapter
  • First Online:
Computational Music Analysis

Abstract

Recent developments in computational linguistics offer ways to approach the analysis of musical structure by inducing probabilistic models (in the form of grammars) over a corpus of music. These can produce idiomatic sentences from a probabilistic model of the musical language and thus offer explanations of the musical structures they model. This chapter surveys historical and current work in musical analysis using grammars, based on computational linguistic approaches. We outline the theory of probabilistic grammars and illustrate their implementation in Prolog using PRISM. Our experiments on learning the probabilities for simple grammars from pitch sequences in two kinds of symbolic musical corpora are summarized. The results support our claim that probabilistic grammars are a promising framework for computational music analysis, but also indicate that further work is required to establish their superiority over Markov models.

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

Access this chapter

Subscribe and save

Springer+ Basic
EUR 32.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or Ebook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 119.00
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 159.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 159.99
Price excludes VAT (USA)
  • Durable hardcover 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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others

References

  • Abdallah, S. A. and Gold, N. E. (2014a). Exploring probabilistic grammars of symbolic music using PRISM. In Proceedings of the First Workshop on Probabilistic Logic Programming, Vienna, Austria.

    Google Scholar 

  • Abdallah, S. A. and Gold, N. E. (2014b). Comparing models of symbolic music using probabilistic grammars and probabilistic programming. In Proceedings of the 2014 International Computer Music Conference (ICMC/SMC 2014), pages 1524–1531, Athens, Greece.

    Google Scholar 

  • Abney, S. P. (1997). Stochastic attribute-value grammars. Computational Linguistics, 23(4):597–618.

    Google Scholar 

  • Attneave, F. (1954). Some informational aspects of visual perception. Pyschological Review, 61(3):183–193.

    Google Scholar 

  • Baker, J. K. (1979). Trainable grammars for speech recognition. The Journal of the Acoustical Society of America, 65(S1):S132.

    Google Scholar 

  • Barlow, H. B. (1961). Possible principles underlying the transformation of sensory messages. In Rosenblith, W. A., editor, Sensory Communication, pages 217–234. MIT Press.

    Google Scholar 

  • Baroni, M., Maguire, S., and Drabkin, W. (1983). The concept of musical grammar. Music Analysis, 2(2):175–208.

    Google Scholar 

  • Baxter, R. A. and Oliver, J. J. (1994). MDL and MML: Similarities and differences. Technical Report 207, Department of Computer Science, Monash University.

    Google Scholar 

  • Bilmes, J. A. and Kirchhoff, K. (2003). Factored language models and generalized parallel backoff. In Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology: Companion Volume of the Proceedings of HLT-NAACL 2003, Short Papers, Volume 2, pages 4–6. Association for Computational Linguistics.

    Google Scholar 

  • Bod, R. (2006). An all-subtrees approach to unsupervised parsing. In Proc. 21st Intl. Conf. on Computational Linguistics and the 44th Annual Meeting of the Association for Computational Linguistics, pages 865–872. Association for Computational Linguistics.

    Google Scholar 

  • Charniak, E. (2000). A maximum-entropy-inspired parser. In Proceedings of the First North American Chapter of the Association for Computational Linguistics Conference, pages 132–139. Association for Computational Linguistics.

    Google Scholar 

  • Chomsky, N. (1957). Syntactic Structures. Mouton de Gruyter.

    Google Scholar 

  • Clark, S. and Curran, J. R. (2003). Log-linear models for wide-coverage CCG parsing. In Proceedings of the 2003 Conference on Empirical Methods in Natural Language Processing, pages 97–104.

    Google Scholar 

  • Clark, S. and Curran, J. R. (2007). Wide-coverage efficient statistical parsing with CCG and log-linear models. Computational Linguistics, 33(4):493–552.

    Google Scholar 

  • Collins, M. (1997). Three generative, lexicalised models for statistical parsing. In Proceedings of the 35th Annual Meeting of the Association for Computational Linguistics and Eighth Conference of the European Chapter of the Association for Computational Linguistics, pages 16–23.

    Google Scholar 

  • Collins, M. (1999). Head-driven statistical models for natural language parsing. PhD thesis, University of Pennsylvania.

    Google Scholar 

  • Collins, M. (2003). Head-driven statistical models for natural language parsing. Computational Linguistics, 29(4):589–637.

    Google Scholar 

  • Cover, T. M. and Thomas, J. A. (1991). Elements of Information Theory. Wiley.

    Google Scholar 

  • Cox, R. T. (1946). Probability, frequency and reasonable expectation. American Journal of Physics, 14(1):1–13.

    Google Scholar 

  • de Finetti, B. (1975). Theory of Probability. Wiley.

    Google Scholar 

  • Domingos, P. and Richardson, M. (2007). Markov logic: A unifying framework for statistical relational learning. In Getoor, L. and Taskar, B., editors, Introduction to statistical relational learning, chapter 12, pages 339–372. MIT Press.

    Google Scholar 

  • Dowe, D. L., Gardner, S., and Oppy, G. (2007). Bayes not bust! Why simplicity is no problem for Bayesians. The British Journal for the Philosophy of Science, 58(4):709–754.

    Google Scholar 

  • Earley, J. (1970). An efficient context-free parsing algorithm. Communications of the ACM, 13(2):94–102.

    Google Scholar 

  • Ebcioğlu, K. (1987). Report on the CHORAL project: An expert system for chorale harmonization. Technical Report RC 12628, IBM, Thomas J. Watson Research Center, Yorktown Heights, NY.

    Google Scholar 

  • Forte, A. (1973). The Structure of Atonal Music. Yale University Press.

    Google Scholar 

  • Frost, R. A. and Hafiz, R. (2006). A new top-down parsing algorithm to accommodate ambiguity and left recursion in polynomial time. ACM SIGPLAN Notices, 41(5):46–54.

    Google Scholar 

  • Gilbert, É. and Conklin, D. (2007). A probabilistic context-free grammar for melodic reduction. In International Joint Conference on Artificial Intelligence (Workshop on Artificial Intelligence and Music) (IJCAI-07), Hyderabad, India.

    Google Scholar 

  • Goodman, J. (1998). Parsing inside-out. PhD thesis, Division of Engineering and Applied Sciences, Harvard University.

    Google Scholar 

  • Goodman, N., Mansinghka, V., Roy, D., Bonawitz, K., and Tenenbaum, J. (2008). Church: a language for generative models. In Proceedings of the Twenty-Fourth Annual Conference on Uncertainty in Artificial Intelligence (UAI-08), pages 220–229, Corvallis, Oregon. AUAI Press.

    Google Scholar 

  • Granroth-Wilding, M. (2013). Harmonic analysis of music using combinatory categorial grammar. PhD thesis, School of Informatics, University of Edinburgh.

    Google Scholar 

  • Granroth-Wilding, M. and Steedman, M. (2012). Harmonic analysis of jazz MIDI files using statistical parsing. In Fifth International Workshop on Machine Learning and Music, Edinburgh, UK.

    Google Scholar 

  • Hamanaka, M., Hirata, K., and Tojo, S. (2006). Implementing “A Generative Theory of Tonal music”. Journal of New Music Research, 35(4):249–277.

    Google Scholar 

  • Hamanaka, M., Hirata, K., and Tojo, S. (2007). FATTA: Full automatic time-span tree analyzer. In Proc. Intl. Computer Music Conference (ICMC2007), Copenhagen, volume 1, pages 153–156.

    Google Scholar 

  • Hinton, G. E. and van Camp, D. (1993). Keeping the neural networks simple by minimizing the description length of the weights. In Proceedings of the Sixth Annual Conference on Computational Learning theory, pages 5–13.

    Google Scholar 

  • Hockenmaier, J. (2001). Statistical parsing for CCG with simple generative models. In Association for Computational Linguistics, 39th Annual Meeting and 10th Conference of the European Chapter, Companion Volume to the Proceedings of the Conference: Proceedings of the Student Research Workshop and Tutorial Abstracts, pages 7–12, Toulouse, France.

    Google Scholar 

  • Hockenmaier, J. and Steedman, M. (2002). Generative models for statistical parsing with combinatory categorial grammar. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 335–342.

    Google Scholar 

  • Honkela, A. and Valpola, H. (2004). Variational learning and bits-back coding: An information-theoretic view to Bayesian learning. IEEE Transactions on Neural Networks, 15(4):800–810.

    Google Scholar 

  • Johnson, M. (1995). Memoization in top-down parsing. Computational Linguistics, 21(3):405–417.

    Google Scholar 

  • Johnson-Laird, P. N. (1991). Jazz improvisation: a theory at the computational level. In Howell, P., West, R., and Cross, I., editors, Representing Musical Structure, pages 291–325. Academic Press.

    Google Scholar 

  • Jordan, M. I., Ghahramani, Z., Jaakkola, T. S., and Saul, L. K. (1998). An introduction to variational methods for graphical models. In Jordan, M. I., editor, Learning in Graphical Models, pages 105–161. MIT Press.

    Google Scholar 

  • Joshi, A. K., Levy, L. S., and Takahashi, M. (1975). Tree adjunct grammars. Journal of Computer and System Sciences, 10(1):136–163.

    Google Scholar 

  • Kass, R. E. and Raftery, A. E. (1995). Bayes factors. Journal of the American Statistical Association, 90(430):773–795.

    Google Scholar 

  • Kassler, M. (1967). A trinity of essays. PhD thesis, Princeton University.

    Google Scholar 

  • Kassler, M. (1976). The decidability of languages that assert music. Perspectives of New Music, 14/15:249–251.

    Google Scholar 

  • Kassler, M. (1987). APL applied in music theory. ACM SIGAPL APL Quote Quad, 18(2):209–214.

    Google Scholar 

  • Kirlin, P. B. (2014). A probabilistic model of hierarchical music analysis. PhD thesis, University of Massachusetts Amherst.

    Google Scholar 

  • Kirlin, P. B. and Jensen, D. D. (2011). Probabilistic modeling of hierarchical music analysis. In 12th International Society for Music Information Retrieval Conference (ISMIR 2011), pages 393–398.

    Google Scholar 

  • Kiselyov, O. and Shan, C.-C. (2009). Embedded probabilistic programming. In Taha, W. M., editor, Domain-Specific Languages, pages 360–384. Springer.

    Google Scholar 

  • Knill, D. C. and Pouget, A. (2004). The Bayesian brain: the role of uncertainty in neural coding and computation. TRENDS in Neurosciences, 27(12):712–719.

    Google Scholar 

  • Knill, D. C. and Richards, W., editors (1996). Perception as Bayesian inference. Cambridge University Press.

    Google Scholar 

  • Kurihara, K. and Sato, T. (2006). Variational Bayesian grammar induction for natural language. In Grammatical Inference: Algorithms and Applications, volume 4201 of Lecture Notes in Artificial Intelligence, pages 84–96. Springer.

    Google Scholar 

  • Lambek, J. (1958). The mathematics of sentence structure. The American Mathematical Monthly, 65(3):154–170.

    Google Scholar 

  • Lerdahl, F. and Jackendoff, R. (1983). A Generative Theory of Tonal Music. MIT Press.

    Google Scholar 

  • Li, M. and Vit´anyi, P. M. B. (2009). An Introduction to Kolmogorov Complexity and its Applications. Springer.

    Google Scholar 

  • Lindblom, B. and Sundberg, J. (1970). Towards a generative theory of melody. Department of Phonetics, Institute of Linguistics, University of Stockholm.

    Google Scholar 

  • MacKay, D. J. C. (1997). Ensemble learning for hidden Markov models. Technical report, Cavendish Laboratory, Cambridge University.

    Google Scholar 

  • MacKay, D. J. C. (2003). Information Theory, Inference, and Learning Algorithms. Cambridge University Press.

    Google Scholar 

  • Marsden, A. (2005). Generative structural representation of tonal music. Journal of New Music Research, 34(4):409–428.

    Google Scholar 

  • Marsden, A. (2007). Automatic derivation of musical structure: A tool for research on Schenkerian analysis. In International Conference on Music Information Retrieval (ISMIR 2007), pages 55–58, Vienna, Austria.

    Google Scholar 

  • Marsden, A. (2010). Schenkerian analysis by computer: A proof of concept. Journal of New Music Research, 39(3):269–289.

    Google Scholar 

  • Marsden, A. (2011). Software for Schenkerian analysis. In Proceedings of the 2011 International Computer Music Conference (ICMC2011), pages 673–676, Huddersfield, UK.

    Google Scholar 

  • Martin-Löf, P. (1966). The definition of random sequences. Information and Control, 9(6):602–619.

    Google Scholar 

  • Mavromatis, P. and Brown, M. (2004). Parsing context-free grammars for music: A computational model of Schenkerian analysis. In Proceedings of the Eighth International Conference on Music Perception and Cognition, pages 414–415, Evanston, IL.

    Google Scholar 

  • Meyer, L. B. (1956). Emotion and Meaning in Music. University of Chicago Press.

    Google Scholar 

  • Muggleton, S. (1996). Stochastic logic programs. In de Raedt, L., editor, Advances in Inductive Logic Programming, volume 32, pages 254–264. IOS Press.

    Google Scholar 

  • Nattiez, J.-J. (1975). Fondements d’une sémiologie de la musique. Union Générale. d’Editions.

    Google Scholar 

  • Norvig, P. (1991). Techniques for automatic memoization with applications to context-free parsing. Computational Linguistics, 17(1):91–98.

    Google Scholar 

  • O’Donnell, T. J., Tenenbaum, J. B., and Goodman, N. D. (2009). Fragment grammars: Exploring computation and reuse in language. Technical Report MIT-CSAIL-TR- 2009-013, MIT.

    Google Scholar 

  • Pachet, F. (2000). Computer analysis of jazz chord sequence: Is Solar a blues? In Miranda, E. R., editor, Readings in Music and Artificial Intelligence, pages 85–114. Routledge.

    Google Scholar 

  • Pachet, F., Ramalho, G., and Carrive, J. (1996). Representing temporal musical objects and reasoning in the MusES system. Journal of New Music Research, 25(3):252–275.

    Google Scholar 

  • Pearl, J. (1988). Probabilistic Reasoning in Intelligent Systems: Networks of Plausible Inference. Morgan Kaufmann.

    Google Scholar 

  • Pereira, F. (1981). Extraposition grammars. Computational Linguistics, 7(4):243–256.

    Google Scholar 

  • Pereira, F. C. and Warren, D. H. (1980). Definite clause grammars for language analysis—a survey of the formalism and a comparison with augmented transition networks. Artificial Intelligence, 13(3):231–278.

    Google Scholar 

  • Pereira, F. C. and Warren, D. H. (1983). Parsing as deduction. In Proceedings of the 21st Annual Meeting of the Association for Computational Linguistics, pages 137–144.

    Google Scholar 

  • Pfeffer, A. (2001). IBAL: A probabilistic rational programming language. In Proceedings of the Seventeenth International Joint Conference on Artificial Intelligence (IJCAI-01), pages 733–740, Seattle, WA.

    Google Scholar 

  • Poole, D. (1991). Representing Bayesian networks within probabilistic Horn abduction. In Proceedings of the Seventh conference on Uncertainty in Artificial Intelligence, pages 271–278, Los Angeles, CA.

    Google Scholar 

  • Poole, D. (1993). Probabilistic Horn abduction and Bayesian networks. Artificial Intelligence, 64(1):81–129.

    Google Scholar 

  • Porter, H. H. (1986). Earley deduction. Technical report, Oregon Graduate Center.

    Google Scholar 

  • Powers, H. S. (1980). Language models and musical analysis. Ethnomusicology, 24(1):1–60.

    Google Scholar 

  • Rissanen, J. (1978). Modeling by shortest data description. Automatica, 14(5):465–471.

    Google Scholar 

  • Rohrmeier, M. (2006). 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.

    Google Scholar 

  • Rohrmeier, M. (2011). Towards a generative syntax of tonal harmony. Journal of Mathematics and Music, 5(1):35–53.

    Google Scholar 

  • Sato, T., Abe, S., Kameya, Y., and Shirai, K. (2001). A separate-and-learn approach to EM learning of PCFGs. In Proceedings of the Sixth Natural Language Processing Pacific Rim Symposium, pages 255–262, Tokyo, Japan.

    Google Scholar 

  • Sato, T. and Kameya, Y. (1997). PRISM: a language for symbolic-statistical modeling. In Proceedings of the Fifteenth International Joint Conference on Artificial Intelligence (IJCAI-97), volume 2, pages 1330–1335, Nagoya, Aichi, Japan.

    Google Scholar 

  • Sato, T., Kameya, Y., and Kurihara, K. (2008). Variational Bayes via propositionalized probability computation in PRISM. Annals of Mathematics and Artificial Intelligence, 54(1–3):135–158.

    Google Scholar 

  • Sato, T., Kameya, Y., and Zhou, N.-F. (2005). Generative modeling with failure in PRISM. In Proceedings of the International Joint Conference on Artificial Intelligence, pages 847–852, Edinburgh, UK.

    Google Scholar 

  • Schenker, H. (1935). Der freie Satz. Universal Edition. (Published in English as E. Oster (trans., ed.) Free Composition, Longman, New York, 1979.).

    Google Scholar 

  • Shannon, C. E. (1948). A mathematical theory of communication. The Bell System Technical Journal, 27(3–4):379–423,623–656.

    Google Scholar 

  • Shieber, S. M. (1985). Criteria for designing computer facilities for linguistic analysis. Linguistics, 23(2):189–212.

    Google Scholar 

  • Sidorov, K., Jones, A., and Marshall, D. (2014). Music analysis as a smallest grammar problem. In Proceedings of the Fifteenth International Society for Music Information Retrieval Conference (ISMIR), pages 301–306, Taipei, Taiwan.

    Google Scholar 

  • Smoliar, S. W. (1980). A computer aid for Schenkerian analysis. Computer Music Journal, 4(2):41–59.

    Google Scholar 

  • Sneyers, J., Meert, W., and Vennekens, J. (2009). CHRiSM: Chance rules induce statistical models. In Proceedings of the Sixth International Workshop on Constraint Handling Rules (CHR’09), pages 62–76, Pasadena, CA.

    Google Scholar 

  • Sneyers, J., Vennekens, J., and De Schreye, D. (2006). Probabilistic-logical modeling of music. In van Hentenryck, P., editor, Practical Aspects of Declarative Languages: 8th International Symposium, PADL 2006, Charleston, SC, USA, January 9–10, 2006, Proceedings, volume 3819 of Lecture Notes in Computer Science, pages 60–72. Springer.

    Google Scholar 

  • Steedman, M. (2001). The Syntactic Process. MIT Press.

    Google Scholar 

  • Steedman, M. (2003). Formal grammars for computational musical analysis. In INFORMS Annual Meeting, Atlanta, GA.

    Google Scholar 

  • Steedman, M. and Baldridge, J. (2011). Combinatory categorial grammar. In Borsley, R. D. and Börjars, K., editors, Non-Transformational Syntax: Formal and explicit models of grammar, pages 181–224. Wiley-Blackwell.

    Google Scholar 

  • Steedman, M. J. (1984). A generative grammar for jazz chord sequences. Music Perception, 2(1):52–77.

    Google Scholar 

  • Stolcke, A. (1995). An efficient probabilistic context-free parsing algorithm that computes prefix probabilities. Computational Linguistics, 21(2):165–201.

    Google Scholar 

  • Stuhlmüller, A. and Goodman, N. D. (2012). A dynamic programming algorithm for inference in recursive probabilistic programs. arXiv preprint arXiv:1206.3555.

  • Temperley, D. (2007). Music and Probability. MIT Press.

    Google Scholar 

  • Ulrich, J. W. (1977). The analysis and synthesis of jazz by computer. In Proceedings of the Fifth International Joint Conference on Artificial Intelligence (IJCAI-77), pages 865–872, Cambridge, MA.

    Google Scholar 

  • Wallace, C. S. (1990). Classification by minimum-message-length inference. In Akl, S. G., Fiala, F., and Koczkodaj, W. W., editors, Advances in Computing and Information—ICCI’90, volume 468 of Lecture Notes in Computer Science, pages 72–81. Springer.

    Google Scholar 

  • Wallace, C. S. and Boulton, D. M. (1968). An information measure for classification. The Computer Journal, 11(2):185–194.

    Google Scholar 

  • Wingate, D., Goodman, N., Stuhlmueller, A., and Siskind, J. M. (2011a). Nonstandard interpretations of probabilistic programs for efficient inference. In Shawe-Taylor, J., Zemel, R. S., Bartlett, P. L., Pereira, F., and Weinberger, K. Q., editors, Advances in Neural Information Processing Systems 24 (NIPS 2011), pages 1152–1160, Granada, Spain.

    Google Scholar 

  • Wingate, D., Stuhlm¨uller, A., and Goodman, N. D. (2011b). Lightweight implementations of probabilistic programming languages via transformational compilation. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics (AISTATS 2011), pages 770–778, Ft. Lauderdale, FL.

    Google Scholar 

  • Winograd, T. (1968). Linguistics and the computer analysis of tonal harmony. Journal of Music Theory, 12(1):2–49.

    Google Scholar 

  • Younger, D. H. (1967). Recognition and parsing of context-free languages in time n 3. Information and Control, 10(2):189–208.

    Google Scholar 

  • Yust, J. (2009). The geometry of melodic, harmonic, and metrical hierarchy. In Chew, E., Childs, A., and Chuan, C.-H., editors, Mathematics and Computation in Music: Second International Conference, MCM 2009, New Haven, CT, USA, June 19–22, 2009. Proceedings, volume 38 of Communications in Computer and Information Science, pages 180–192. Springer.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Samer Abdallah .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2016 Springer International Publishing Switzerland

About this chapter

Cite this chapter

Abdallah, S., Gold, N., Marsden, A. (2016). Analysing Symbolic Music with Probabilistic Grammars. In: Meredith, D. (eds) Computational Music Analysis. Springer, Cham. https://doi.org/10.1007/978-3-319-25931-4_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-25931-4_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-25929-1

  • Online ISBN: 978-3-319-25931-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics