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.

Script<br />

Scripts Category<br />

A Script is a handy way to construct <strong>Sound</strong>s algorithmically (rather than piecing them together graphically<br />

in the <strong>Sound</strong> editor). <strong>The</strong> constructed <strong>Sound</strong> will be a Mixer of several Inputs, each with its own start<br />

time (or TimeOffset).<br />

A Script is like any other <strong>Sound</strong> in that it can be used as an Input to a more complex <strong>Sound</strong>; <strong>for</strong> example,<br />

a Script can contain variables and can even be used as an Input to another Script.<br />

Inputs<br />

Use the script to schedule each of these <strong>Sound</strong>s at a specific time and to supply values <strong>for</strong> any variables<br />

in the <strong>Sound</strong>’s parameters. (Script actually uses each of these Input <strong>Sound</strong>s as a template or model <strong>for</strong><br />

creating new instances of the <strong>Sound</strong>s with specific values at specific times. Multiple instances of a<br />

<strong>Sound</strong> can be scheduled from the script by specifying simultaneous start times or overlapping durations.)<br />

Script<br />

<strong>The</strong> script supplies start times <strong>for</strong> the <strong>Sound</strong>s in the Inputs field and, optionally, sets the values of any<br />

variable parameters. To specify an event in the script, type:<br />

start: {: }.<br />

In other words, type the name of an Input <strong>Sound</strong>, a space, the word "start" followed by a colon and then a<br />

space, a start time followed by units of samp or s or beats, and then any number of <br />

pairs followed by a period. <strong>The</strong> pairs consist of the name of a variable in the Input, a<br />

colon, a space, and then a value <strong>for</strong> that variable. To specify the length of a beat, assign the desired<br />

metronome setting to the variable MM. If an Input takes another <strong>Sound</strong> as an argument, you can supply<br />

it from the script as a parenthesized event with no start time.<br />

Any Smalltalk expression can appear in the script, including temporary variable declarations and control<br />

structures like loops.<br />

See the manual <strong>for</strong> more details and examples.<br />

Left<br />

This controls the level of the left output channel. <strong>The</strong> maximum value is 1 and the minimum is -1. <strong>The</strong><br />

left channel of the output is multiplied by the value of this parameter. Some example values <strong>for</strong> Left are:<br />

1 (no attenuation)<br />

0 (maximum attenuation)<br />

!Fader1 (continuous controller sets level)<br />

!KeyVelocity (MIDI key velocity controls the amplitude)<br />

You can also paste another signal into this field, and the amplitude will vary with the output amplitude of<br />

the pasted signal (something like an LFO controlling the attenuation). (See the manual <strong>for</strong> a complete<br />

description of hot parameters, EventValues, EventSources, and Map files).<br />

Right<br />

This controls the level of the right output channel. <strong>The</strong> maximum value is 1 and the minimum is -1. <strong>The</strong><br />

right channel of the output is multiplied by the value of Right. Some example values <strong>for</strong> Right are:<br />

1 (no attenuation)<br />

343

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

Saved successfully!

Ooh no, something went wrong!