Assignment 4 is to make a sample player and demonstrate it playing a boogie bass line using a sequencer. If you want you can download and use this sample, locding it into the wavetable using the "soundfiler" object.
This can most easily be done using a "line~" -style sampler such as shown in class Feb. 7, although you can alternatively use the "phasor~" design (from Feb. 2 class).
You'll need two line~ objects, one to provide the "phase" to a tabread4~ object to read out of the stored wavetable, and another one to control amplitude. The line~ controlling phase should get a pair of messages to begin each "note", one causing it to jump to the beginning location and the other to start it ramping to create the sound.
Amplitude control is important - you want the amplitude to be zero at the moment when the "phase" (location in the wavetable) changes discontinuously, then to rise quickly (maybe 1/100 sec) to 1, then to decay over the life of the note to get an enveloping effect.
You can adjust the transpositions of the tabread4~ output by adjusting the amount of time the phase-generating line~ is given to reach a fixed, far-off endpoint (for instance, 10 seconds into the wavetable). Alternatively, and a bit easier in this situation, take a fixed time duration (such as ten seconds), and compute how far forward in the wave table one should go over ten seconds to get the desired transposition.
You can use a message-based sequencer of the sort developed 1/2 (see the saved patches),to generate a sequence of pitches (a possible boogie bass line in MIDI pitches is (60, 64, 67, 69, 72, 69, 67, 64, each repeated twice). The result should sound something like this.
For extra credit:
By changing the onset (starting location) in the soundfile, you can change the timbre of the played-back sample. Make the patch automatically choose onsets that ramp back and forth every 5 or 10 seconds to make a pleasingly varying sound as the patch runs, as demonstrated in like this soundfile.