09.12.2012 Views

The Kyma Language for Sound Design, Version 4.5

The Kyma Language for Sound Design, Version 4.5

The Kyma Language for Sound Design, Version 4.5

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.

Event Sources are specified by preceding the name of the Event Source by an accent grave (`). <strong>The</strong>y are<br />

displayed in blue in the user interface.<br />

<strong>The</strong> only way to control an Event Value externally (<strong>for</strong> example, by a MIDI keyboard, fader, sequencer,<br />

etc.) is to map it to one of the following Event Sources:<br />

`MIDIKeyDown `MIDIKeyNumber `MIDIKeyVelocity<br />

`MIDIController00 thru `MIDIController127<br />

`MIDIPitchBend `MIDITimeCode `MIDIChannelPressure<br />

`MIDIProgramNumber<br />

MIDI Continuous Controller Sources<br />

MIDI continuous controller Event Sources are designated as `MIDIController00 through `MIDI-<br />

Controller127. <strong>The</strong> signal processor automatically scales the continuous controller values received via<br />

MIDI control change messages (which are in the range of (0,127)) to the range of (0,1).<br />

MIDI Keyboard Sources<br />

MIDI note on and off messages control the Event Sources `MIDIKeyDown, `MIDIKeyNumber, and<br />

`MIDIKeyVelocity. <strong>Kyma</strong> treats MIDI note on messages with zero velocity in the same way as MIDI<br />

note off messages with a velocity equal to the velocity of the original note on message.<br />

`MIDIKeyDown is set in the following way:<br />

♦ a note off message causes it to be set to 0<br />

♦ a note on message causes it to first be set to -1, and then, five milliseconds later, to be set to +1<br />

A value of -1 in the trigger of an envelope (<strong>for</strong> example, ADSR) tells the envelope to rapidly decay the<br />

envelope to zero. <strong>The</strong> later value of +1 tells the envelope to begin its attack.<br />

`MIDIKeyNumber contains the key number from the note on message. It is set at the same time that<br />

`MIDIKeyDown is set to +1.<br />

<strong>The</strong> velocity part of a MIDI note message is scaled from its range of (0,127) to the range of (0,1).<br />

`MIDIKeyVelocity is set to this scaled value at the same time that `MIDIKeyDown is set to +1.<br />

MIDI note events are allocated to individual voices within a MIDIMapper or MIDIVoice according to the<br />

polyphony, MIDI channel and pitch range specified in the mapping <strong>Sound</strong>. A note is allocated to the oldest<br />

voice that is not in use, or, if all voices are currently in use, the voice that has been on <strong>for</strong> the longest<br />

amount of time.<br />

Other MIDI Sources<br />

<strong>The</strong> remaining MIDI messages are mapped in the following way:<br />

♦ MIDI program change messages cause the Event Source `MIDIProgramNumber to be set to the new<br />

program number. Program numbers are in the range of 1 to 128.<br />

♦ MIDI channel aftertouch messages cause the Event Source `MIDIChannelPressure to be set to the<br />

channel pressure value (scaled from (0,127) to (0,1)).<br />

♦ MIDI pitch bend messages set `MIDIPitchBend. Its range of (-2048,2048) is scaled to the range<br />

of (-1,1).<br />

♦ MIDI time code messages cause `MIDITimeCode to be set to the time received. Additionally,<br />

`RealTime (the time in seconds since the <strong>Sound</strong> was started) is updated whenever these messages<br />

are received.<br />

Signal Processor Sources<br />

<strong>The</strong> signal processor itself is the source of some Event Sources:<br />

♦ `Time is the time in seconds since the entire <strong>Sound</strong> structure was started.<br />

♦ `LocalTime is the time in seconds since the <strong>Sound</strong> using `LocalTime was started.<br />

474

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

Saved successfully!

Ooh no, something went wrong!