"Now art is the contrary of chaos." - this statement made by Igor Stravinsky in his "Poetics of Music" emphasizes the fundamental problem of music, which is organizing sound into a coherent logical whole.
This problem of opposing chaos has been up until till now only partially solved, hence many different music composition methods and styles.
We propose structure theory, which is a system for organizing sounds by means of a mathematical graph model, that can form the basis of any musical piece, independent of style.
The foundations of the model are two sets of rules for modeling: the perception of time and the perception of sound in the horizontal and vertical contexts.
To provide a tool for composers and music theoreticians to experiment with structure theory, we further propose the Forte Framework for Music Composition.
The framework consists of two embedded domain-specific languages: the Forte DSL and the Graph DSL.
The domain of the former is the music analysis theory of Allen Forte which we describe, systematize and enhance with several generalizations.
Besides proposing a DSL for this domain we contribute by showing how to use the knowledge of the domain itself, indexed type families and phantom types to achieve: (1) implementation swapping, (2) self-optimizing library code and (3) boilerplate code reduction.
We provide the aforementioned features in a purely functional setting and without building an abstract syntax tree (we use a shallow embedding).
Our second proposal, the Graph DSL, is an implementation of our structure theoretic graph model.
To materialize our ideas for music organizing we describe an algebra for directed acyclic graph manipulation and show how structure theory can be translated onto this algebra.
The Graph DSL itself is general enough to be used for creating and transforming graphs from other domains, but we focus on presenting our DSL in the context of the Forte Framework, with the Forte DSL being the drop-in language for node specification.
We also show an extended example of music analysis that demonstrates one of the two possible applications of our framework, with the other major use being music composition. We chose Haskell to implementent both the Forte DSL and Graph DSL of the Forte Framework.
12. Forte DSL
Allen Forte (born December 23, 1926) is a music theoretician
and musicologist best known for his work The Structure of
Atonal Music published by Yale University Press.
What is Forte theory?
A mapping of pitches to pitch classes
A mapping of intervals to interval classes
A grouping of pitch classes with pitch class sets
Pitch class set normalization
Various pitch class set relations
Analysis with interval vectors and basic interval patterns
Complexes and subcomplexes
14. Pitches to Pitch Class Sets
Forte mapping - "Clair de lune" C. Debussy
15. Contributions
What we propose:
Forte theory systematization and enhancement
A EDSL instead of a batch processor for manipulating
Forte-theoretic entities
Techniques for domain abstraction, interpretation swapping
and self-optimizing library implementation
A method for boilerplate code reduction