Log in

No account? Create an account
13 February 2005 @ 08:00 am
An algebra of music  
Despite being able to play only the drumset even sub-semi-competently, I find music theory interesting. It's fun to play around with.

For a while now I've been fiddling around off and on with the idea of an algebra of music, sort of as an extention to the classical idea of "canon", in which an entire piece of music is described by a single written theme and a rule that describes how it repeats and changes. I was inspired by reading about fugues, and saw that the pattern in which a theme recurs, transposed, can be seen as another melody (think of the pattern formed by the first note of each instance of the theme), and that this combination of two melodies (theme and fuguing-melody) is conceptually a lot like multiplication.

My "theory" (I'll call it that, despite the fact that it doesn't seek either to describe existing music or to proscribe future works) is based on the note. This is the most basic unit: an entity with the properties of pitch, duration, and timing. Pitch represents the physical frequency of the sound, which is technically real-valued, but we'll generally limit ourselves to a tuning: a pattern of pitch classes (C# is an example of a pitch class) that repeats at the diapason (usually the 2:1 frequency ratio, a.k.a the octave, but in the case of the Bohlen-Pierce scale the 3:1 frequency ratio). In the case of tunings with a finite number of pitch classes, it can be represented with an integer. Duration is a real number specifying the length of time the note is to be sounded in terms of beats. Timing is a nonnegative real value that represents when the note is played in terms of beats from the beginning of the motive.

A motive is a snippet of written music. It's a space of notes, like a set except that it can contain more than one, or less than zero, instances of a note. Addition is easy enough to define: A + B = C, such that C contains all of the notes in A and B. In other words, it just superimposes A on B. Subtraction just reverses the process: to get the result of A - B, remove every note in A that corresponds to a note in B. Problems come up when B contains notes that don't appear in A: in that case, we say that the result has negative one of that note (yeah, you can't play music with negative notes. Shut up).

Multiplication is a little weirder. First off, let's define multiplication between individual notes: multiply their respective pitches (in terms of frequency; since we'll be working in terms of steps within a tuning, and that's logarithmic, it'll look like addition to us) and durations, and add their timings. We can then define a motive multiplied by a note as the motive produced by multiplying each note in the original motive by the "scalar" note. The product of two motives A and B would be the sum of products of motive A with each note in motive B.

Lots of operations can be defined on these. Horizontal inversion would reverse the order of notes. Vertical inversion would reverse the direction of intervals between notes ("flipping it upside down", if you were looking at written score). Horizontal rotation by duration would add a given amount to the timing of each note in a motive, modulo the length of the motive, such that a note whose duration overlaps the end of the motive would "wrap around". Vertical rotation by interval  would raise the pitch of all notes in a motive by a given amount (usually expressed as a number of tuning steps), modulo the closest multiple of diapasons equal to or greater than the distance between the highest and lowest notes in the motive (bonus points if you can tell why). Horizontal rotation by notes would add the timing of the last note in the motive minus the timing of the penultimate note to all other notes and set the last note's timing to 0 (making it first), a given number of times. Vertical rotation by notes would transpose the highest n notes down by octaves until they were the lowest n notes (note that, if all of the notes have the same timing, this is equivalent to "inversions" of a chord in traditional theory).

The idea is that, given a suitable theory of consonance and dissonance, a composer could find solutions to compositional problems by writing an equation describing the problem and solving for the unknown. For example, given an existing motive , a composer might want to find a shorter motive he can use as an ostinato bassline that, if added to the known motive, would be within a certain range of consonance.

A few open questions:
  • How do you define division? Is it possible to define division so that the existing definition of motives is closed under division?
  • Is there a better way to define this stuff?
  • What other operations would be useful to define?
Tags: ,
Current Mood: creativecreative
Current Music: MC, SuperGreenX - Dance Dance Revolution 4F73R M3 OC ReMix
gwallagwalla on February 14th, 2005 03:38 am (UTC)
The thing about multiplying durations is it would let multiplication handle the problem of diminution and augmentation: to shrink the motive, multiply it by a half-beat note; to expand it, multiply by a note of more than one beat duration.
Alun Clewealun_clewe on February 14th, 2005 03:51 am (UTC)
Except that multiplication, as you've defined it, would also affect the pitches and timings. Sure, you could multiply by a note with a frequency of 1 Hz and a timing of 0, but that still leaves the awkwardness of a unit-dependent definition of multiplication, and besides diminution and augmentation are common enough phenomena (certainly far more common than any of the "rotations" you've defined) that they deserve their own operation.

I'm still in favor of redefining multiplication, and giving diminution/augmentation its own definition. Defining multiplication in a unit-dependent way is just ugly. (And besides, it means realistically you're only ever going to be multiplying by notes of durations too low to hear. Even a multiplication of a frequency by, say, 55, which is the frequency in Hertz of the second A below middle C, would mean the product would be raised (relative to the other factor) by nearly six octaves. Seriously, the multiplying-frequencies definition of note multiplication is pretty much useless.)

In all honesty, though, I think that while all these definitions of operations may be interesting, the ultimate goal of this whole thing--the bit about finding a new motive that fits by solving for an unknown--is probably a lost cause. Music is very mathematical in nature, true, and canons and fugues particularly so, but I have my doubts that it can be reduced to such simple manipulations.
Alun Clewealun_clewe on February 14th, 2005 03:52 am (UTC)

Er...that should be "multiplying by notes of frequencies too low to hear". Sorry. Didn't catch the typo till I'd already posted.
Alun Clewealun_clewe on February 14th, 2005 04:18 am (UTC)
Whoops! Another minor typo. 55 Hz is actually the frequency of the third A below Middle C. The second A below Middle C has a frequency of 110 Hz...and multiplying by it, according to your definition, would raise a note by nearly seven octaves!
Alun Clewealun_clewe on February 14th, 2005 05:41 am (UTC)
Ah, one more note (er...no pun intended). On further reflection, even by your original definition multiplication could not in fact effect either horizontal or vertical scaling.

For horizontal scaling, it's not enough to multiply the durations by some constant. You have to multiply the timings by that same constant as well. Otherwise, the notes are being held longer, but they're still coming in at the same time, and will probably end up overlapping. Multiplication, even by your original definition, cannot multiply all the timings by the same constant, so it can't be used to bring about horizontal scaling.

And it can't bring about vertical scaling either. Doubling all the intervals (or multiplying them by some other constant) is not the same thing as just doubling all the pitches. All that will accomplish is transposing the entire motive; it won't affect the intervals between notes in the slightest. Mathematically, to double the intervals, you have to square the frequencies, and then (assuming you want the first note to stay on the same pitch) divide them all by the frequency of the first note in the motive. (And, similarly, to multiply all the intervals by a factor of N, you have to raise all the frequencies to the Nth power, and then divide them all by the frequency of first note in the motive raised to the (N-1)th power.) That can't be done by a simple multiplication either.

So, even if you do keep your original definition of multiplication (which, as I've stated, I'm very much not in favor of), horizontal and vertical scaling still have to be covered by separate operations.