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.

RhythmicCellularAutomaton<br />

Scripts Category<br />

This <strong>Sound</strong> is based on the one-dimensional cellular automata described by Stephen Wolfram in his book<br />

"<strong>The</strong>ory and Applications of Cellular Automata". <strong>The</strong> state, an n-place binary number, where n is the<br />

number of Inputs, determines when the Input is turned on and when it is turned off in a given generation.<br />

An integer, rule, is used to determine the next state.<br />

This differs from the CellularAutomaton in that the state is interpreted "horizontally" (rhythmically) rather<br />

than "vertically" (harmonically). Each generation of the automaton is interpreted as a rhythmic pattern,<br />

where a 1 means the Input is turned on, and a 0 means the Input is turned off (<strong>for</strong> the duration of the<br />

Input).<br />

Input<br />

This <strong>Sound</strong> is repeated in a pattern determined by the state of the automaton in each generation. When<br />

a value in the state array is 1, the <strong>Sound</strong> is played, and when a value in the state array is 0, there is a<br />

silence of the same duration as the <strong>Sound</strong>. This field accepts only one <strong>Sound</strong> at a time.<br />

Rule<br />

If you look at the rule and the state as 8-bit binary numbers, you can use the rule to compute the next<br />

generation of the state. Number the positions of the digits 0 to 7 counting from right to left. To compute<br />

the next generation of position P of the state: Take the number at position P, P+1 and P-1 (i.e. the<br />

number at position P and its neighbors to the right and to the left). Think of this as a three digit binary<br />

number N that you are going to use as an index into the binary number representing the rule. Look at<br />

position N of the rule. <strong>The</strong> value at position N of the rule is the value of position P in the next generation<br />

of the state.<br />

For example, if the rule is 2r10101110 and the state is 2r10010101, let’s compute the next generation<br />

state of position 3. <strong>The</strong> current value at position 3 of the state is ’0’. Looking at position 3 and its two<br />

neighbors as a binary number, we get ’101’ or the number 5. Using this number as an index, look at<br />

position 5 of the rule; it is ’1’. So the value of position three in the next generation is ’1’. When you reach<br />

the rightmost or leftmost digit in the state, make the assumption that there is an infinite number of zeroes<br />

extending both leftwards and rightwards.<br />

Generations<br />

This is the number of generations.<br />

InitialState<br />

Imagine the initial state as an n-bit binary number where n is the size of the collection of Inputs. Each digit<br />

in the binary number corresponds to a <strong>Sound</strong> in the Input collection; use a 1 to indicate that a <strong>Sound</strong> is<br />

initiallly on, a 0 to indicate that it is initially off.<br />

GenerationLength<br />

This is the number of bits in each generation.<br />

330

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

Saved successfully!

Ooh no, something went wrong!