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.

its range of legal values, its default value, its list of units, and whether it requires units (e.g., hz or s). <strong>The</strong><br />

type is used by the <strong>Sound</strong> editor to check whether the values entered in the parameter fields make sense<br />

<strong>for</strong> those particular parameters. Later, when you compile a <strong>Sound</strong> of this new class, any parameter fields<br />

with invalid values will flash and the host computer will beep twice.<br />

<strong>The</strong> best way to learn about types is to use the class editor to inspect the parameter types of some of the<br />

system <strong>Sound</strong> classes. See the table at the end of this chapter <strong>for</strong> an exhaustive listing of the types and<br />

their ranges.<br />

Parameter Fields<br />

Field describes the kind of field the parameter will have in the <strong>Sound</strong> editor. <strong>The</strong> kind of field determines<br />

how you will be able to enter values <strong>for</strong> that parameter in the <strong>Sound</strong> editor. For example, a<br />

hotValue field lets you type Event Values as well as constants, and a soundCollection field allows<br />

you to drag multiple <strong>Sound</strong>s into the field.<br />

In the <strong>Sound</strong> class editor, the contents of the Field list depends upon the currently selected Type; only<br />

those fields that are legal <strong>for</strong> the selected type are shown.<br />

<strong>The</strong> different kinds of fields available are as follows:<br />

Field Description<br />

array Allows you to type in values separated by spaces; this field accepts them<br />

in order as an array.<br />

boolean A check box that allows you to choose true or false.<br />

codeString Used in Script, the FileInterpreters, and ParameterTrans<strong>for</strong>mer <strong>for</strong> the<br />

Script or Trans<strong>for</strong>mation field. It parses what you have entered and<br />

checks its syntax whenever you try to load or edit another <strong>Sound</strong>. A<br />

codeString provides you with more detailed error messages than a<br />

value field does.<br />

fileName A browse button that opens a file list dialog.<br />

grammar <strong>The</strong> field used <strong>for</strong> the production rules of ContextFreeGrammar. See the<br />

Prototypes Reference on page 218.<br />

legalName<strong>Sound</strong>-<br />

Collection<br />

Accepts any number of <strong>Sound</strong>s with legal variable names. This is needed<br />

in Script and the FileInterpreters so that you can refer to the <strong>Sound</strong>s by<br />

name in the Script.<br />

radioButtons Presents built-in choices (depending on the type of field) as a column of<br />

radio buttons. For example, if you choose radio button in the class editor<br />

<strong>for</strong> the type of the WordSize field in a DiskRecorder, the WordSize field<br />

will display radio buttons corresponding to the three word size choices.<br />

radioButtonsTwoColumns Same as radioButtons, but displays in two columns.<br />

samplesFileList <strong>The</strong> field used in the Segments parameter of the SamplesFileSplicer.<br />

sound Accepts only one <strong>Sound</strong> at a time.<br />

soundCollection Accepts any number of <strong>Sound</strong>s.<br />

string A text editor that will accept any sequence of characters. It cannot be set<br />

to a variable.<br />

symbolList A pop-up list of choices that presents a list of values.<br />

value Allows you to type any value, variable, or expression. <strong>The</strong> expression is<br />

evaluated when you load or edit another <strong>Sound</strong>.<br />

wavetable Allows you to select a sample from a file dialog or to type in the name of<br />

a sample file or a variable.<br />

538

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

Saved successfully!

Ooh no, something went wrong!