Grammar-based automated music composition in Haskell

  • Authors:
  • Donya Quick;Paul Hudak

  • Affiliations:
  • Yale University, New Haven, CT, USA;Yale University, New Haven, CT, USA

  • Venue:
  • Proceedings of the first ACM SIGPLAN workshop on Functional art, music, modeling & design
  • Year:
  • 2013

Quantified Score

Hi-index 0.00

Visualization

Abstract

Few algorithms for automated music composition are able to address the combination of harmonic structure, metrical structure, and repetition in a generalized way. Markov chains and neural nets struggle to address repetition of a musical phrase, and generative grammars generally do not handle temporal aspects of music in a way that retains a coherent metrical structure (nor do they handle repetition). To address these limitations, we present a new class of generative grammars called Probabilistic Temporal Graph Grammars, or PTGG's, that handle all of these features in music while allowing an elegant and concise implementation in Haskell. Being probabilistic allows one to express desired outcomes in a probabilistic manner; being temporal allows one to express metrical structure; and being a graph grammar allows one to express repetition of phrases through the sharing of nodes in the graph. A key aspect of our approach that enables handling of harmonic and metrical structure in addition to repetition is the use of rules that are parameterized by duration, and thus are actually functions. As part of our implementation, we also make use of a music-theoretic concept called chord spaces.