13.07.2015 Views

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

Tutorials and Topics - Peabody Computer Music

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Tutorial 21MIDI Control:Using the poly~ objectkeeps track of the number of inlets <strong>and</strong> outlets it needs to create when you tell it whichsubpatch to load.Messages sent to a poly~ object are directed to different instances of the subpatchdynamically using the note <strong>and</strong> midinote messages, <strong>and</strong> manually using the target message.When poly~ receives a note message in its left inlet, it scans through the copies of thesubpatch it has in memory until it finds one that is currently not busy, <strong>and</strong> then passesthe message to it. A subpatch instance can tell its parent poly~ object that it is busy usingthe thispoly~ object. The thispoly~ object accepts either a signal or number in its inlet to setits busy state. A zero signal or a value of 0 sent to its inlet tells the parent poly~ that thisinstance is available for note or midinote messages. A non-zero signal or value sent to itsinlet tells the parent poly~ that the instance is busy; no note or midinote messages will be sentto the object until it is no longer busy. The busy state was intended to correspond to theduration of a note being played by the subpatcher instance, but it could be used to meananything. In the example above, when the audio level out of the *~ is nonzero—thatiteration of the subpatch is currently busy. Once the amplitude envelope out of line~reaches zero <strong>and</strong> the sound stops, that subpatch's copy of thispoly~ tells poly~ that it isready for more input.The thispoly~ object can also control the activity of signal processing within each copy ofthe subpatch. When the mute message is sent to thispoly~ followed by a 1, all signalprocessing in that subpatch stops. When a mute 0 message is received, signal processingstarts again.171

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!