Skip to content
mjwillson edited this page Sep 13, 2010 · 3 revisions

The approach I’ve taken is to implement the mathematical structures which underlie various kinds of music-theoretic objects like scales, modes, chords etc. And then deal with mapping the mathematical objects to and from their traditional names as a layer on top. This has some savings as often different types of music theory objects can be represented by the same kind of underlying mathematical structure.

The mathematical structures in question being a set (Pitches) with an action on that set by the additive group of Integers (PitchInterval), Pitches taken modulo octaves (PitchClass), sets of Pitches (PitchSet) and PitchClasses (PitchClassSet), sets of Pitches taken themselves modulo octaves (PitchSet::ModuloOctaves) and modulo arbitrary transpositions (PitchSet::ModuloTransposition), sets of PitchClasses taken modulo arbitrary transpositions (PitchClassSet::ModuloTransposition) and so on. And then various natural embeddings between these structures, many of which are performed automatically as coercions in order to compare or operate on two structures at the same level of identity.

There’s also the beginnings of some work to represent Vectors (as opposed to Sets) of Pitches and of PitchIntervals. These are useful for representing chords on stringed instruments, chords sung by a choir, etc, where it matters which string/person is playing which note. A vector of pitch intervals can then be displayed as (say) a chord fingering diagram for a guitar.

Future goals may involve bringing Time into the equation, and modelling functions from Time to each of these structures. This would allow musical phrases to be represented modulo various levels of equivalence.

Clone this wiki locally