This assignment is intended to give you practice making polyphonic instruments using abstractions as voices and distributing messages to them. The assignment is to make a patch that loads at least eight copies of an abstraction that simply plays a note, using a sinusoidal oscillator with a "line~" amplitude control. A stream of messages should specify the pitch of each note to play as a MIDI number. Using the techniques of the example patch from Feb. 3, distribute them among the copies of "voice.pd". THe outputs can be summed using throw~ and catch~ or alternatively as it's done in the Pd example, D11.sampler.poly, in the Pd example patches.
Inside the abstraction the amplitude should be controlled by a "line~". (In the sound example I squared the output for a better decay shape). You could make the rise time 10 milliseconds, and the decay time 1 second. As usual you'll have to start the decay after a delay to allow the rise segment to complete, or else it will cancel the attack.
You can give the abstraction a signal outlet (the "outlet~" object) and just add all the outputs up. Somewhat better style might be to make a "summing bus", as is done in the online documentation examples.
To generate the notes, outside the abstraction (in the "main" patch), use a "metro" to send "bang" messages to a random number generator and add an offset. This will make a stream of suitable MIDI pitches you can send to the polyphonic patch.
There should be separate controls to set:
The result should sound something like this.
For extra credit, make the notes appear randomly out of the left and right speaker. The result should sound like this.