Struggling Towards an Algebraic Theory of Music
13 points by ztoz
13 points by ztoz
“Art is any science with more than seven variables” — I forget who said this first, I saw it on a Stereolab album
This is one of those nailing-jelly-to-a-tree things. You can’t pin down music this way, unless you restrict yourself to particular aspects of particular styles of music, like maybe the use of harmony in Western “classical” music.
The OP's model seems similar to MIDI note data: a series of (time, pitch, timbre, duration) tuples. Except even MIDI expresses more than that: pitch-bend can modulate pitch continuously over time, and CCs can alter timbre in arbitrary ways. (In regular MIDI those globally affect all notes, but with MPE each note can have independent modulations.)
If you play guitar, especially electric, you’ll know there are all kinds of ways you can alter a note's sound with bends, hammer-ons, palm muting, where on the string you pick, the angle of the pick, which pickups are on, the volume/tone knobs, positioning the guitar near the amp, and of course using any number of pedals. The first few of these are absolutely critical — “Roll Over Beethoven” without bends or slides would just be lifeless.
At the extreme there’s stuff like La Monte Young's or Eliane Radigue's drone music where there are no notes, just continuously varying held tones that overlap and morph over long periods of time.
The author's idea of "music" is something like a MIDI event stream. There are things I consider music that don't fit this model, but I won't nitpick further. Let's work with the author's definition.
I think the reason they ran into roadblocks is that they were trying to model a polyphonic note stream as a function of time, and I don't think this works: proof follows.
A polyphonic note stream is just a set of notes, where each note is (start-time, duration, pitch, timbre, volume). It's a set, not a function.
Can we make a function of time out of this set? The set theoretic model of a function is a set of (arg, result) pairs, where each arg value only occurs once in the set. If there are multiple occurrences of an arg value, then the set is a relation, but it is not a function. We could remodel a polyphonic note stream as a set of pairs, where time is the first element: (start-time, (duration, pitch, timbre, volume)). The problem is that more than one note can have the same start time. So our set is not a function of time (but it is a relation).
Agreed, but there’s very little music you can accurately represent this way because pitch, timbre and volume are not constant over a single note. (Maybe they are in piano and some percussion instruments, but not most.)
Yes, I just copied the "pitch, timbre, volume" from the OP after disclaiming that I didn't agree with it.
The more general problem is that there is no generally accepted music representation that can accurately describe all of the performances that I consider to be music. If there were, it would be expensive to work with and it wouldn't have a very useful algebra. Instead, we have multiple different music representations, specialized to particular classes of instruments and particular musical traditions. Specialized and restricted representations have richer algebras and are better to work with. If you are working with a tabla, you have very different needs than if you are working with a piano.
So I don't believe in a universal algebraic theory of all music.
Can we make a function of time out of this set? The set theoretic model of a function is a set of (arg, result) pairs, where each arg value only occurs once in the set. If there are multiple occurrences of an arg value, then the set is a relation, but it is not a function. We could remodel a polyphonic note stream as a set of pairs, where time is the first element: (start-time, (duration, pitch, timbre, volume)). The problem is that more than one note can have the same start time. So our set is not a function of time (but it is a relation).
μ (Music a) = Time -> Set (Duration, a)
This is a function of time? This is coherent with how MPE works, as far I can see? So you have note on events corresponding to start time, and note off implicitly as start-time + duration.
does the author know about Pure Data? (if you haven't heard of it, here's a good example)
I wonder if starting with physical sounds is the wrong approach, when what we care about is perception of sounds. That requires figuring out what you, the human, with your cultural and musical background, perceive, of course, but that's why it's music and not just sound.
What about this?
μ Music = Time -> Set (Voice -> (Note, Duration))
This doesn’t account for meter, chords, ADSR, connected notes, or expression. I think meter and chords are each best addressed as a potential projection of the music into a lower-dimensional space, i.e., a feature inherent to the music; ideally you’d also have some theoretical metric for comparing the projection to the music itself. ADSR and expression (e.g., staccato or accent) should be a feature of the notes themselves. Connected notes I’m not sure about; maybe the list of n notes should be accompanied by a list of n-1 note transitions describing glissando, etc.?
Stepping back a bit, I think you might want to describe the internal structure of music before you dive into analyzing it as a group, monoid, or any such other object you can perform operations on.
Trying to formalize music without a definition of what exactly music is for that purpose is futile and pointless, I suppose. In medieval Gregorian chants and a lot of modern music, time is a very loose factor. Sometimes not a factor at all. Sometimes pitch isn't a factor.
I'm going to give an example of a highly successful formalization of a particular style of music. Renaissance counterpoint used to be taught through a convoluted set of rules, not unlike logic before Boole. Then Sergey Taneev noticed that if we denote perfect unison as zero, there's a calculable invariant — voices can move only by intervals that add up to an even number of octaves or octave+fifth intervals.
Trying to completely formalize Baroque part writing is already quite futile. Best you can say about parallel perfect intervals is that unintentional parallel fifths and octaves are forbidden. Many part writing guidelines say that all voices must not go in the same direction. The reality is, if you choose to move all voices in the same direction, it's very likely that you'll end up with unintentional parallel fifths or octaves if you aren't careful. But there are examples in authentic period music where the renowned giants like Handel or JS Bach do that. If I get enough free time, I'll eventually catalogue examples of those folks going against textbooks that claim to teach "the Baroque style".
Hummm… I was playing with scores..
Each voice is a tree that branches in integers, so you get every possible rational on the tree, corresponding to where notes land.
Those voices in parallel make melodies
A voice here can be a single sample or more (but then again you can put anything at the leaves)
The operations are displacement in time, inversion, mirroring and so on. Time modulation. Or transposition. You do get algebraic laws to respect time signatures, harmony. Harmony I guess is cycles or cyclic groups
This interval tree and voicing approach allowed me to split rhythm and voicing or melody. I was first thinking of forking and syncing processes. Intervals are better
As for the types, use lists of lists of lists… with anything down. You need fixed point operator here.
Parallel / sequential composition of rhythms. A rhythm is just a set of rationals in a given duration and all rhythms are power sets of the rationals
A forest of rationals. You map it to lists of rationals