Assignment 4 is to make a looping sample player and demonstrate it playing a boogie bass line.
This can be done using the techniques shown 1/25. Grab the file, "voice.wav", from the files saved from the 1/25 class. Make an array of at least 1-1/2 seconds and read the sample in.
Using a phasor~ whose range is adjusted (by multiplying be the length of the range and then adding the location of the beginning of the range, both in audio samples because that's how the array is stored, read values from the array using the tabread4~ object.
You can adjust the frequencies of the tabread4~ output be adjusting the frequencies of the phasor~. However, you will have to transpose (multiply) the frequencies by some low number (in one way of thinking, you want to divide the desired frequency by the "natural frequency" of the sample, which is the fundamental frequency you hear when the phasor~ is set to 1 Hz.
You can use a sequencer of the sort developed 1/18 (see those patches), or else use the looping technique developed 1/25, to generate a sequence of pitches (a possible boogie bass line is (60, 64, 67, 69, 72, 69, 67, 64, repeat) or any other transposition of those pitches). The result should sound something like this.
For extra credit:
the example above looped an uncertain number of times per "note" in the bass line. See if you can force the number of repetitions to be exactly 4 each time, as demonstrated in like this soundfile.