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.

To read several channels, create several MIDIVoices, each assigned to its own channel but reading the<br />

same MIDI file, and place all of them into a Mixer:<br />

By saving the controller movements in a MIDI file and reading them with the MIDIVoice, you can combine<br />

the <strong>Sound</strong> and the means <strong>for</strong> controlling the <strong>Sound</strong> into one package — another manifestation of the<br />

ubiquitous “sound object”!<br />

Time Functions<br />

Among the functions that the <strong>Kyma</strong> real-time evaluator can understand are functions that change over<br />

time. Examples include !LocalTime whose value is simply the current time in seconds since the <strong>Sound</strong><br />

started playing, or repeatingRamp: which generates a ramp or sawtooth-shaped function that changes<br />

linearly from 0 up to 1 and then repeats.<br />

Suppose you had a GenericSource that was set to read a sample from RAM and that you wanted its frequency<br />

to increase gradually over time. You could enter the following expression into the Frequency<br />

parameter field:<br />

4 c + !LocalTime nn<br />

This would result in a sample whose pitch would increase continuously at the rate of one half step per<br />

second. Alternatively, you might use something like<br />

(!KeyDown ramp: 0.1 s) * 3 nn + !Pitch<br />

This would give you the pitch from the keyboard plus a pitch bend from zero to three half steps over the<br />

course of a tenth of a second. Or, if you didn’t want to rely on any keyboard input at all, you could use<br />

something like<br />

(1 repeatingRamp: 3 s) * 440 hz + 440 hz<br />

which would result in a frequency that would glide from 440 hz up an octave to 880 hz over the course<br />

of three seconds, and then repeat the process over and over <strong>for</strong> the duration of the <strong>Sound</strong>.<br />

To trigger a <strong>Sound</strong> periodically, you can use the bpm: (beats-per-minute) function. For example, if you<br />

put the following into the Trigger field of the GenericSource:<br />

1 bpm: 60<br />

it would be triggered once per second. To effectively “loop” a disk file that is 3.5 seconds in duration, you<br />

could type the following into the Trigger field:<br />

1 bpm: (60 / 3.5)<br />

This would trigger the disk playback once every 3.5 seconds.<br />

50

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

Saved successfully!

Ooh no, something went wrong!