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.

First, in the Class Description field, enter a short description of what this class does. <strong>The</strong>n select<br />

left in the Parameter list. In the Comment field, remind the user (and yourself many months in the<br />

future when you try to use this <strong>Sound</strong> again but have <strong>for</strong>gotten how you set it up) that this is the level of<br />

the left channel, and that the level on the right channel is one minus this value. With left still selected,<br />

change the Field from positiveScale to hotPositiveScale.<br />

Select Variable and enter a comment <strong>for</strong> this variable as well.<br />

Close the class editor, and save the changes to the edited class. Try out opening Stereo again and paste<br />

the Event Value !Pan into the Left parameter field. Try playing Stereo and controlling the value of<br />

!Pan from the virtual control surface (or MIDI controller). Once you have finished experimenting, close<br />

the <strong>Sound</strong> editor.<br />

Now let’s improve the stereo placement function. Find the example you retrieved (it should be called<br />

StereoLocator and should have variables in it). Edit it and replace its right parameter with<br />

(1 - ?left squared) sqrt<br />

You may have to choose Large window… (Ctrl+L) from the Edit menu to make the field large enough to<br />

see what you are doing. Close the <strong>Sound</strong> editor and keep the changes you have made.<br />

Choose New class from example from the Action menu, supply a value <strong>for</strong> ?left and click on Default<br />

<strong>Sound</strong> <strong>for</strong> Variable. This time we don’t have to start from scratch. Drag Stereo from the <strong>Sound</strong> file window<br />

into the Icon field, and then drag it again into the Parameter field. This sets the icon, parameter<br />

types, and locations to those specified in class Stereo.<br />

Type in ImprovedStereo <strong>for</strong> the name of this new class. Tab over to the Class Description field<br />

and enter a new description. Close the class editor and save an instance of the new class. Compare the<br />

panning of ImprovedStereo to that of Stereo.<br />

Algorithmic <strong>Sound</strong> Construction: Your Computer is your Slave<br />

You have by now seen multiple examples of how to construct <strong>Sound</strong>s in the graphical editor. In those<br />

cases where you can systematically describe the relationships between <strong>Sound</strong>s and parameters, you can<br />

use the Script <strong>Sound</strong> to construct complex <strong>Sound</strong>s <strong>for</strong> you automatically, according to an algorithm that<br />

you specify in the Smalltalk-80 programming language. Your program can be as simple as a series of<br />

events, saying when each <strong>Sound</strong> should start, or as elaborate as a new system <strong>for</strong> music composition. To<br />

specify events, all you have to learn is how to specify the start time of a <strong>Sound</strong>. For more elaborate projects,<br />

you have the power of a full programming language — Smalltalk-80 — to work with.<br />

Let’s start with simple event script and, step-by-step, develop it into a short program. Find Script in the<br />

Algorithms category of the system prototypes window, drag a copy into your <strong>Sound</strong> file window, and<br />

open a <strong>Sound</strong> editor by double-clicking on it. Replace its input wavelet with Attenuator from the system<br />

194

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

Saved successfully!

Ooh no, something went wrong!