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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Implementing st<strong>and</strong>ard MIDI messagesTutorial 19: MIDI control—SynthesizerIn this chapter we’ll demonstrate how to implement MIDI control of a synthesisinstrument built in MSP. The example instrument is a MIDI FM synthesizer with velocitysensitivity, pitch bend, <strong>and</strong> mod wheel control of timbre. To keep the example relativelysimple, we use only a single type of FM sound (a single “patch”, in synthesizer parlance),<strong>and</strong> only 2-voice polyphony.The main issues involved in MIDI control of an MSP synthesizer are• converting a MIDI key number into the proper equivalent frequency• converting a MIDI pitch bend value into an appropriate frequency-scaling factor• converting a MIDI controller value into a modulator parameter (such as vibrator rate,vibrato depth, etc.).Additionally, since a given MSP object can only play one note at a time, we will need toh<strong>and</strong>le simultaneous MIDI note messages gracefully.PolyphonyEach sound-generating object in MSP—an oscillator such as cycle~ or phasor~, or a sampleplayer such as groove~ or play~—can only play one note at a time. Therefore, to play morethan one note at a time in MSP you need to have more than one sound-generating object.In this tutorial patch, we make two identical copies of the basic synthesis signal network,<strong>and</strong> route MIDI note messages to one or the other of them. This 2-voice polyphonyallows some overlap of consecutive notes, which normally occurs in legato keyboardperformance of a melody.Assign a voice number with poly to play polyphonic musicThe poly object assigns a voice number—1 or 2 in this case—to each incoming notemessage, <strong>and</strong> if more than two keys are held down at a time poly provides note-off154

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

Saved successfully!

Ooh no, something went wrong!