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.

self keyDownAt: (i - 1) beats duration: 0.25 beats frequency: 4 c + i nn velocity: (i / 12.0)].<br />

or:<br />

| r t |<br />

r := Random newFor<strong>Kyma</strong>WithSeed: 66508.<br />

t := 0.<br />

100 timesRepeat: [<br />

t := t + r next.<br />

self keyDownAt: t s duration: 0.25 beats frequency: (r next * 1000 + 60) hz velocity: r next].<br />

You can also create sequences and mixes of "notes" and "rests" or collections of MIDI events, each<br />

associated with its own time tag.<br />

To create a rest object, use:<br />

Rest durationInBeats:<br />

To create a note, use any of the following creation messages:<br />

Note durationInBeats:<br />

Note durationInBeats:frequency:<br />

Note durationInBeats:frequency:velocity:<br />

Note durationInBeats:velocity: frequency:<br />

Note durationInBeats: frequency:durationInBeats:velocity:<br />

To create a sequence of events (where an event is a Note, a Rest, an EventSequence, an EventMix, or a<br />

TimedEventCollection) use:<br />

EventSequence events: .<br />

To create a mix of events which all start at the same time (where an event is a Note, a Rest, an<br />

EventSequence, an EventMix, or a TimedEventCollection) use:<br />

EventMix events: .<br />

To create a collection of events, each of which has a starting time associated with it (where an event is a<br />

Note, a Rest, an EventSequence, an EventMix, or a TimedEventCollection, and the starting time is<br />

specified in beats) use:<br />

TimedEventCollection startingBeats: events: .<br />

To play a Note, Rest, EventSequence or EventMix, use:<br />

playOnVoice:onBeat:bpm:<br />

playOnVoice:<br />

playOnVoice:bpm:<br />

playOnVoice:onBeat:<br />

Trans<strong>for</strong>mations that can be applied to Notes, Rests, EventSequences, EventMixes or<br />

TimedEventCollections include:<br />

dim: <br />

trsp: <br />

dbl: <br />

retrograde<br />

Trans<strong>for</strong>mations that can be applied to EventSequences, EventMixes or TimedEventCollections include:<br />

randomOrder<br />

randomizeTimesUsing: <br />

pickingEventsUsing: <br />

totalBeats: <br />

quantizeTo: <br />

maxSpacing: <br />

For examples using these creation and manipulation methods, see MIDI scripts in the manual.<br />

291

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

Saved successfully!

Ooh no, something went wrong!