Music 171 homework 7 (due Mar. 4)
This assignment is another exercise in voice management: make a polyphonic sampler (a much simpler one than in the example in the Pd documentation), to which you just send numbers as MIDI pitches. So for instance, sending the voice bang the number 60 should result in your hearing the sample at original pitch. Use the "bell.aiff" sample (and read it as "../bell.aiff" so that you don't have to send the bell via FTP!)

For clarity, make an "r pitch" object that feeds the pitches to the voice bank. To make it play, you can make a random stream of numbers (use the "random" object and a "+" to adjust its output range.)

As before make a bank of voices, but instead of receiving a "bang" input to turn on (as in the previous homework), they should each get a floating-point number to specify pitch. So you'll have to fix the voice abstraction to start an envelope and set the frequency -- AND PHASE -- of a phasor~ object to read the table.

When you get a new pitch to play, outside the abstraction, you'll have to use a counter to choose a voice, then "pack" the voice number with the pitch, then "route 0 1 2 3 4 5 6 7", for instance, to get the pitch to the right voice.

You will also have to figure out how to convert from a MIDI pitch to a suitable frequency to give the phasr~ object so that "60" (which converts to 261.62) goes to one divided by the range, in seconds, of the phasor.

The "bell.aiff" soundfile is in your pd\doc\sound directory; or you can download it (312KB) here .

For extra cedit, put on a controllable vibrato; that's the way you hear it in this soundfile.

back to music 171 main page