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

Create successful ePaper yourself

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

Event Values<br />

Even though the GenericSource program is permanently running on the Capybara, we still only hear the<br />

sample once because the Trigger is an unchanging constant. § How can we control the value of Trigger?<br />

One way would be <strong>for</strong> <strong>Kyma</strong> to watch <strong>for</strong> incoming MIDI keyboard events, setting the value of<br />

Trigger to 1 when the key is down and 0 when the key goes up. ‡<br />

To specify that the Trigger should come from MIDI key down:<br />

1. Click or Tab into the Trigger field<br />

2. Press the Escape key on your computer keyboard (the cursor changes to a little fader)<br />

3. Play two keys at once on your MIDI keyboard<br />

Play the GenericSource and try triggering it with the MIDI keyboard. Try changing the ReleaseTime to<br />

50 ms, play the GenericSource, and play the keyboard again. AttackTime and ReleaseTime provide a<br />

simple amplitude envelope on the GenericSource to avoid on/off clicks.<br />

A red name that starts with an exclamation point (like !KeyDown, above) is called an Event Value. An<br />

Event Value is not a constant, like an ordinary number. Instead, it relies on external events <strong>for</strong> its value.<br />

<strong>The</strong>se external events include: pressing a MIDI keyboard key, moving a MIDI fader, sending out MIDI<br />

events from a software sequencer, moving a fader in <strong>Kyma</strong>’s virtual control surface, generating events<br />

algorithmically using the MIDIVoice or AnalogSequencer <strong>Sound</strong>s, or even writing your own C programs<br />

to set these Event Values as if they were variables in your program.<br />

An Event Value can change while the <strong>Sound</strong> is playing, unlike a constant value which is set once when<br />

the <strong>Sound</strong> first starts up.<br />

Playing this monotone harp GenericSource begs the question, how can you control Frequency from the<br />

keyboard? <strong>The</strong> steps are almost the same:<br />

1. Click or tab into the Frequency field<br />

2. Press Escape once (do not hold it down)<br />

3. Play a single key on the MIDI keyboard<br />

§ <strong>Sound</strong>s that have Trigger fields are triggered whenever the Trigger becomes positive. To trigger the <strong>Sound</strong><br />

again, the Trigger has to become zero or negative, then positive again.<br />

‡ If you haven’t already done so, now is the time to connect the output of your MIDI keyboard and/or other controllers<br />

directly to the MIDI in jack on the back of the Capybara. To make sure that you are receiving MIDI, use<br />

Configure MIDI… (found under the DSP menu); it has an option to display all incoming MIDI events.<br />

38

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

Saved successfully!

Ooh no, something went wrong!