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.