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.

If you are excited by the prospect of creating <strong>Sound</strong>s algorithmically, see Scripts and FileInterpreters on<br />

page 525, and <strong>The</strong> Smalltalk-80 <strong>Language</strong> on page 513.<br />

<strong>Sound</strong>s vs. Events<br />

It is important, at this point, to make a clear distinction between the Script <strong>Sound</strong> and the script parameter<br />

of a MIDIVoice or MIDIMapper.<br />

In the case of the MIDIVoice, you have a single <strong>Sound</strong> that is loaded on the Capybara, and the script is<br />

generating Event Values that will update parameters of that <strong>Sound</strong>. It is like playing notes on a single<br />

instrument.<br />

<strong>The</strong> Script <strong>Sound</strong>, on the other hand, creates a new <strong>Sound</strong> — a Mixer with several inputs (each of which<br />

may be optionally time-offset). Once this mixer <strong>Sound</strong> has been created, it is then loaded into the Capybara.<br />

<strong>The</strong> Script is a way to algorithmically construct <strong>Sound</strong>s, similar to the kinds of things you do in the<br />

graphic user interface: dragging new <strong>Sound</strong>s into a Mixer, setting their values, putting a TimeOffset on<br />

each one to delay its start time relative to the others, etc.<br />

A Script in a MIDIVoice is like sending MIDI events to a patch on your synthesizer, whereas a Script is<br />

like actually creating a new synthesizer. In fact, it makes perfect sense to have a Script as an input to a<br />

MIDIVoice. <strong>The</strong> Script would create a <strong>Sound</strong> and could even place Event Values in some of the parameter<br />

fields algorithmically. <strong>The</strong> MIDIVoice would supply events that would change those Event Values<br />

over time.<br />

In other words, the idea of the MIDIVoice is to supply parameter value updates to an existing architecture,<br />

while the idea of the Script <strong>Sound</strong> is to algorithmically create a new architecture. It would not be a<br />

very good use of the Script to treat it like a “score”, generating hundreds of note-events <strong>for</strong> the same<br />

“instrument”, because the Script would actually create hundreds of copies of the instrument, each set up<br />

to play one single note — like a bell choir. <strong>The</strong> idea of hundreds of notes played on a single instrument<br />

fits the MIDIVoice model much better — one instrument, lots of notes. (This is not to say that you cannot<br />

use the Script as a score — only that it is not as efficient as doing the same thing with a MIDIVoice). On<br />

the other hand, if you want to create something that changes from a sampler, to a synthesizer, to a disk<br />

playback, or if you wanted to create some music in, say, three large sections each with a different set of<br />

“instruments”, then the Script would be the most appropriate way to implement it.<br />

Specialized Algorithmic <strong>Sound</strong>s<br />

In addition to the Script, there are several <strong>Sound</strong>s in the Algorithmic category that implement specific<br />

algorithms <strong>for</strong> putting together new <strong>Sound</strong>s:<br />

♦ CellularAutomata<br />

♦ ContextFreeGrammar<br />

♦ RandomSelection<br />

♦ Repetition<br />

♦ Substitution<br />

Any one of these could have been written instead as a script <strong>for</strong> the Script <strong>Sound</strong>. <strong>The</strong> Script is the most<br />

general solution <strong>for</strong> constructing <strong>Sound</strong>s algorithmically, but in some instances it is easier to use one of<br />

these more specialized <strong>Sound</strong>s. See Prototypes Reference beginning on page 218 <strong>for</strong> details on how to use<br />

each of these algorithmic “sound constructors”.<br />

Live green, see red, feel blue<br />

At this point, it is probably worth reiterating what the different colors mean when you see them in parameter<br />

fields or in global or local maps.<br />

?Green Variable<br />

This is used as a kind of place holder or variable in a parameter field of a <strong>Sound</strong>. It always begins with a<br />

question mark and a letter and can be followed by any number of letters or numbers. It must be associated<br />

with an actual value at some point be<strong>for</strong>e the <strong>Sound</strong> is loaded into the Capybara. If you do not set<br />

72

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

Saved successfully!

Ooh no, something went wrong!