Join 3,561 readers in helping fund MetaFilter (Hide)


Composing the neverending song.
May 5, 2006 4:09 AM   Subscribe

The mathematics of experimental music - I need some help composing a piece that will give John Cage a run for his money.

So I have this idea, that I've been experimenting for a while with in Audiomulch. Phrases of melody, of varying lengths, played on top of each other and constantly repeating.

For instance, one phrase might be 7 bars long, another 31 bars, another 53 bars long. All these phrases are playing at the same time, and repeating constantly, giving an ever-changing interplay of tones.

I want to be able to calculate how long it is before the entire composition repeats itself - how long until all the phrases align again like they were at the start. At first glance, it seems that multiplying the repeat lengths might give me an idea (7 x 31 x 53 = 11501 bars), but if any of the repeat lengths share common factors, it seems like this might not work out correctly.

If you like, you can imagine it as a set of wheels with a marker on them, all spinning at a different number of revolutions per minute. How long until all the markers line up at their starting positions again? Is there some formula I can apply to this to work out how long my song will be before it repeats? What is the best way to pick the length of each repeating phrase? Again, intuitively I feel that prime numbers are the way to go, to avoid common factors. Is this correct?
posted by Jimbob to Science & Nature (19 answers total) 1 user marked this as a favorite
 
Common factors shouldn't make a difference. You just have to check that each length will divide into multiples of the greatest length. For example, 4 and 6 share a common factor of 2, but you still don't get the lined up position until 12.
posted by Roger Dodger at 4:19 AM on May 5, 2006


What you want is called the least common multiple (lcm) of the numbers.

If the numbers involved aren't too big, you can use a simple method based on factoring into primes; see, for example here (method #2).

A better method for large numbers is to use Euclid's Algorithm to find the greatest common divisor (gcd) of your numbers, then use the rule that lcm(a,b) = a*b/gcd(a,b). Euclid makes finding the gcd very fast. See here, for example.

Or, use this java-based lcm calculator to do the job.
posted by Wolfdog at 4:19 AM on May 5, 2006


For example, 4 and 6 share a common factor of 2, but you still don't get the lined up position until 12.

Well this is exactly what makes it difficult - using my "multiply" method, 6 x 4 = 24, not twelve. But I'm going to get my head around Wolfdog's suggestion and see how it turns out.
posted by Jimbob at 4:26 AM on May 5, 2006


Yes, that java applet is a thing of beauty. Top marks.
posted by Jimbob at 4:27 AM on May 5, 2006


Right, 12 is the least common multiple of 4 and 6. Basically, the lcm methods that Wolfdog points out are shortcuts to actually dividing all of your selected numbers into each multiple of 6. Here you get it on {6, 12} but for the case of three primes, like you mention above, you'd have to check {53, 106, 159, 212, ... , 11501} until you find the answer. The calculator looks like the way to go.
posted by Roger Dodger at 4:31 AM on May 5, 2006


Not answering your question, but didn't Brian Eno do much the same with his Generative Music? I seem to remember the program was distributed on a floppy disc. Would love to get a copy ...
posted by Pericles at 4:44 AM on May 5, 2006


(It's not an immediate answer to your question, but since you mentioned experimental music, you should look for recordings of Conlon Nancarrow's studies for player piano. He did a lot of what you're talking about — interlocking phrases of different lengths going in and out of sync — and that shit sounds awesome.)
posted by nebulawindphone at 4:45 AM on May 5, 2006


Damn, prior art ;) I should do my research.
posted by Jimbob at 5:02 AM on May 5, 2006


This technique, known as isorhythm, actually goes back to medieval music, and was re-discovered by 20th century composers, most notably Olivier Messiaen in pieces like his Quartet for the End of Time. The rhythm is referred to as the "talea" and the melody as the "color."
posted by ludwig_van at 5:41 AM on May 5, 2006


More here:
This revolution in rhythm is best seen in the quartet’s introductory movement, the "Liturgy of Crystal." For the piano Messiaen superimposed a progression of twenty-nine densely voiced chords (some of which have as many as nine notes) upon a pattern of seventeen rhythmic durations. He added to this a cello part constructed of five harmonics coupled to a pattern of fifteen rhythmic values, arranged in two palindromes: the first a three-note rhythm and the second a twelve-note grouping. Messiaen would later call this kind of thing a "non-retrogradable rhythm." Messiaen had rediscovered a medieval device called "isorhythm," in which unequal patterns of chords, pitches, and rhythms revolved around each other—except for medievalists, few musicians knew of the device until the 1950s. By avoiding metrically defined phrases and patterns of stressed and unstressed beats, these isorhythmic "wheels within wheels" destroyed any sense of meter, and thus created a piece of music outside of "time."
There's a lot to be learned from these guys. Nancarrow did interesting stuff too, as well as Berg, Bartok, Stravinsky, Debussy, Cage, Babbitt, Hindemith, and others. 20th century, wooo!
posted by ludwig_van at 5:46 AM on May 5, 2006


This is also tangential, but your idea sounds a bit like In C by Terry Riley (except that musicians do eventually move from one phrase to the next in that piece). Perhaps it will give you some ideas on how to make the overlapping phrases of different lengths sound good together.
posted by danb at 7:13 AM on May 5, 2006


...didn't Brian Eno do much the same with his Generative Music?

He was doing this with tape loops as far back as 1978, with Music for Airports.
posted by Dean King at 8:06 AM on May 5, 2006


On Discreet Music Eno composed a short musical phrase with no time indicators and gave to a group string musicians and had them all play the phrase at random times and timings. The result is gorgeous, although not mathematically precise in the sense that your talking about.

Philip Glass does something similar to what you're thinking in the basic construction of his musical phrases, where the left hand may be playing a 3/4 pattern and the right is playing 5/4. So the result is essentially a 15/4 pattern.
posted by doctor_negative at 9:17 AM on May 5, 2006


Philip Glass does something similar to what you're thinking in the basic construction of his musical phrases, where the left hand may be playing a 3/4 pattern and the right is playing 5/4.

That's a polyrhythm or polymeter, and is not quite the same as an isorhythm.

To be clearer than I was above, the earliest examples of the isorhythmic technique are from the 14th Century, and Messiaen's Quatuor pour la fin du temps was composed in 1940.
posted by ludwig_van at 9:45 AM on May 5, 2006


Also:

On Discreet Music Eno composed a short musical phrase with no time indicators and gave to a group string musicians and had them all play the phrase at random times and timings. The result is gorgeous, although not mathematically precise in the sense that your talking about.


That's what's known as aleatoric (from the Latin "alea," for dice), indeterminate, or chance music.
posted by ludwig_van at 9:48 AM on May 5, 2006


ludwig_van, right on--don't forget Reich and his early experiments with phasing, too (Come Out, Piano Phase, It's Gonna Rain, etc.).

danb, Riley's In C is actually not much like this--it would be closer to aleatoric than anything. Players are never supposed to get more than 3 or 4 cells apart from one another, so the whole ensemble moves through the piece at approximately the same rate. (Currently rehearsing In C for a in two weeks!)
posted by LooseFilter at 10:54 AM on May 5, 2006


Indeed, there are lots of aleatoric pieces like that. My last composition project was to write an aleatoric piece. I provided a score with tempo, dynamics, and rhythm indicated, but no pitch or instruments specified. Each player picks a scale before the piece begins - any major, minor, or any mode. Over each of the notes in the score is the numbers 1-7, and each player plays the note corresponding to that degree of his chosen scale. So the rhythm is fixed, as is the basic melodic contour, but the harmony is totally unpredictable. I haven't seen anyone try to play it since it's been finalized, though.
posted by ludwig_van at 11:28 AM on May 5, 2006


That is, one number between 1-8, 8 indicating the root an octave up, appears over each note, not all of them.
posted by ludwig_van at 11:29 AM on May 5, 2006


LooseFilter: Yeah, it's a different concept, but I think it's relevant here. From the OP: "All these phrases are playing at the same time, and repeating constantly, giving an ever-changing interplay of tones." In C would be useful to look at because it does the same thing on a smaller scale (only a few phrases at a time, as you say). Still, it illustrates how to get repeated phrases of different lengths to sound good together, which is important for Jimbob's project. (Also, good luck with your performance! I just played it a couple of weeks ago.)

ludwig_van: That's a neat idea. You should see if you can get someone to write a program that'll let you choose the scales and play it back in MIDI.
posted by danb at 11:37 AM on May 6, 2006


« Older I've taken a few hundred conti...   |  Cast iron or teflon griddle? ... Newer »
This thread is closed to new comments.