Music 171 assignment 3 (due Jan. 27): "phase music"
Make a patch that plays two copies ("voices") of a looping series of pitches, looping at slightly different speeds so that they slip in and out of phase. This idea was made famous by Steve Reigh in pieces such as "Come Out" and "Piano Phase".

The two copies should be identical except that one runs through its series of pitches slightly faster than the other.

To make an oscillator play a series of pitches, you can use a "phasor~" object to ramp repeatedly from 0 to 1 in the correct amount of time for the series to last. Then if you want, say, 8 notes in the series, multiply the output by 8; then you can use 'tabread~' to read the pitches out of an array.

The array need only have as namy elements as you want pitches. The easiest way to get the pitches into the table will be to edit them in and make the array save its contents in the patch.

The 'tabread~' output can then just be the input of an 'osc~' object that makes the sound.

You can add two copies of the network described above, chosing an appropriately low amplitude so that they don't clip on output. The result should sound something like this.

For extra credit:

(WARNING: this one is hard! Don't try it unless you either found the assignment too easy or else want to really spend a lot of time on this!)

Make every third note have a distinct timbre (overtone structure). Make it VERY distinct (for instance, third through fifth barmonics without any fundamental). There are elegant ways to do this, but the only way that doesn't use techniques you haven't seen yet is to have two copies of the patch, one for each waveform, and to make first one, then the other, speak, keeping the other one silent by dropping its frequency to zero.

Now the figure repeats every 24 notes instead of 8. As before, make two of these phase against each other. The result will take longer to play through all its variations; as I did it it takes 30 seconds to do so; 60 seconds of sample output (warning: 5 megabyte file!) is available here.