CAMUS
Cellular Automata MUSic generator
By Eduardo Reck Miranda
Released as FREEWARE MARCH 2001
TUTORIAL by Eduardo Reck Miranda
_____________________________________________________
APPENDIX III - Tutorials.
1. A tutorial to get by in CAMUS.
This tutorial is an attempt to give a general overview on the operational possibilities of CAMUS for beginners.
Hopefully, before trying to use CAMUS, its functional concepts should be understood. Otherwise some technical terms used here will not make any sense. It is recommended to study the earlier chapters in this report which outline the fundamentals of this program.
Essentially CAMUS generates MIDI output based on the parallel evolution of two different cellular automaton algorithms: the Conway's life game and the Grif- feath's demon automata 1 (Dewdney 1989).
The life cellular automaton is respon sible for pitch selection. Each cell corresponds to a triad: the first pitch is given by a predefined sequence of 12 pitches and the other two pitches are determined by the coordinates of a cell in the musical space. Each coordinate corresponds to a pitch distance2. Each cell has its own duration based on a distribution formula and speed rate, both specified by the user. Also, each cell has an internal typology. Typology is the shape which pitches can assume according their individual trigger time and durations within a cell. The life cellular automaton is also responsible for typology selection according to certain genetic codes associated with the cell's neighbouring states. Sometimes one or more pitches of a cell can overlap its duration into another cells.
The demon cellular automaton is respon sible for the orchestration. In other words, it determines which MIDI channel will be used to output a cell according to its state. A cell in CAMUS' demon cellular automata can assume up to 9 different states. This means that CAMUS can output up to 9 different MIDI channels (from channel 1 to 9). The orchestration value is given by the user. Each channel should be able to play 6 polyphonic voices (a triad plus 3 possible overlaps from previous cells).
The user can specify up to 22 different articulations to be performed within a certain step's loop. After specifying how many steps3 should be performed by a loop, the user can specify how many articulations will take place in there4. Each articulation has its own speed, dynamics and 12 pitch sequence. Also, the initial and final time step should be specified. Default values are assumed if no articulation was specified, or in the case of gaps between two articulations.
1.1. The screen components.
The previous figure illustrates the CAMUS' operational screen. Each part is described as follows:
a. von Neumann Musical Space 1: this space is used by CAMUS to represent the demon cellular automata algorithm. Also the user use this space to set up an initial state for the life cellular auto mata algorithm;
b. von Neumann Musical Space 2: this space is used by CAMUS represent the life cellular automata algorithm;
c. coordinates bar: this shows the mouse position on the von Neumann Musical Space 1 while the user is drawing the life's initial sate;
d. life/death panel rule: used to set up the life/death rule to be used by life algorithm. The values on the left side represent minimum values and on the right for maximum ones. If a wrong rule is specified, as soon as the start button is clicked, CAMUS prints out a warning message and the original Conway's values are assu med;
e. loop bar: loop counter to indicate which articulation is being played;
f. distribution panel: used to set up the dis- tribution option needed to build up an initial state for demon algorithm. Also the same distribution is used to work out duration values to play a cell. There are 3 options: uniform, linear and triangular distributions;
g. orchestration panel: used to specify how many instruments should be used. It cor- responds to the number of states that each demon cell can assume. The orchestration number indicates how many MIDI channels will be used (in that order) to play the music. The minimum value is 2 and the maximum 9;
h. counter bar: it is a general counter of time steps (or configurations). Indicates which cellular state is being played. It is a circular counter. Goes up to 9999 before reseting;
i. articulation panel: used to specify how many articulations will be performed. CAMUS performs up to 22 articulations;
j. loop limit: used to specify a limit value for the loop counter. Remember that all articulations should happen inside a loop. This value should not be less than the number of articulations;
k. overlap bar: indicates when a pitch's duration overflows the whole duration of a cell. Up to three pitches can overlap to other cells at the same time;
l. setup/break/save button: this button should be clicked in order to set up the articulations and the life's initial state. When a performance is interrupted, it may be clicked on if you wish to stop it. After breaking a performance it must be clicked on again if you want save the information about the played cells;
m. default panel: shows the default values used by CAMUS when no articulation has taken place or was not specified;
n. quit/ go on/ start/ skip button: quit button is clicked to quit the program. When a performance is interrupted, 'go on' may be clicked if you want to continue. After drawing the life's initial state, click on the 'start' button to start the performance. After breaking a performance 'skip' must be clicked if you do not want to save information about the cells played;
o. stop button: clicked to temporarily interrupt a performance;
p. jump buttons: clicked to jump to the previous or to the next articulation setup. The whole articulation setup panel consists of all panels on the screen's right side;
q. clear button: clicked to clear everything;
r. ok button: clicked to finish setting up the articulations;
s. increment/decrement buttons: used to in crease or decrease the values of a selected pitch (indicated at t.);
t. current pitch indicator bar: indicates which one of the 12 pitch sequence is being defined;
u. pitch panel: used to specify a sequence of 12 pitches to be used by an articulation to generate a cell's triad. Pitches are repre sented by MIDI pitch numbers;
v. dynamics panel: used to specify the dyna mics and its variation for an articula tion. Dynamics is represented by key velocity MIDI number. Velocity ranges from 0 to 127;
w. speed panel: used to specify the speed rate and its variation for an articulation. The maximum speed value is 9999 and the minimum is 20. Good musical results are obtained around default value (9200). Very low values can be used if you want use CAMUS to trigger musical sections or long sound events stored in somewhere else (Samplers, MidiGrid5, etc.), rather than single pitches;
x. start/end step panel: used to specify the start step and the end step for an articulation;
y. articulation's headline bar: indicates the current articulation setup. Also used to display a warning message when a wrong setup is detected;
z. command line: used by CAMUS to print out error messages and to pick up a file name from the user;
1.2. The operational flowchart.
The following flowchart illustrates the hierarchy of operations and its possibilities.
Each variable numeric value on the screen has two black squares: one on the left side with a minus sign and other on the right side with a plus sign. By pressing the left mouse button on the appropr square you can one-by-one increase or decrease this value. In some cases, if you press the right mouse button, the value increases/decreases by a different rate (100-by-100 or 10-by- 10). To change the distribution option there is a small black square on the panel's top right side.
Note that the buttons at the screen's bottom right side change their function and thus their labelling accordingly to the current state of the program. For example, the 'setup' button sometimes changes to 'break' 'save' button.
To draw the life's initial state, press the left mouse button to fill a cell and the right mouse button to clear a cell. The coordinates bar below the von Neumann Musical Space 1 (torus 1) indicates the mouse posi tion.
In order to set up the pitch sequence for an articulation, observe these following operations:
i. click the left mouse button on the square
corresponding to the pitch to be selec
ted. Its colour is inverted;
ii. click left/right mouse on the minus
or plus black square to change its value.
The minimum pitch value is 12 and the
maximum 96 (it is a MIDI number);
iii. go back to the inverted pitch's square,
click right mouse button to switch off
this selection. Its colour is normali
sed;
The demon cellular automata evolution can not be seen while is being processed. But when the performance is interrupted by clicking the stop buton, CAMUS prints out the current demon state.
CAMUS stores information about each cell which is played in an internal strucutre. You can save it on disk after stopping a performance. CAMUS can save two types of files: CAM and PRO. You must use one of those types at the end of a file name (eg. MUSIC.CAM or MUSIC.PRO). PRO files are ready to be consulted by a PROLOG program, such as the experimental PROCAM cellular editor. CAM files can be loaded into CAMPLAY's internal structure to be performed (see item 2.).
1.3. An example operation.
Before using the program make sure that the MIDI equipment is set up correctly. Remember that CAMUS can output up to 9 channels of MIDI data. It depends on your orchestration choice. Ideally, each channel should be able to play 6 polyphonic voices.
Let us go through a practical example, through the following instructions:
1. Run the program CAMUS.PRG by double clicking on
the icon;
2. go to the orchestration panel and double-click
the left mouse button on the [+] right
black square. Now the orchestration value is
4;
3. go to the articulation panel and click the
left mouse button on the [+] right black
square in order to make articulation=1;
4. go to the loop limit panel and make loop
limit=5;
5. click the left mouse button at setup button.
The button should invert its colour. It
means that CAMUS is in setup mode;
6. go to the articulation setup panel. Note that
'artic. 1' is printed on the top. Make start
step=1 and end step=3. It means that this
articulation will take place from step loop 1
to step loop 3. During loop 4 and loop 5 CAMUS
will assume the default values to carry on the
performance;
7. select speed, for example, 9200 and speed
variation=500. The speed value will oscillate
between 8700 and 9700;
8. make dynamics=127 with no variation. This
is the maximum value;
9. now you should set up a pitch sequence for
this articulation. Press the left mouse button
on one of those small 12 pitch's squares. It
should invert its colour. By clicking on the
[+]/[-] black squares you can increase
or decrease this pitch value. To finish go
back to the inverted pitch square and click
the right mouse button. Decide for yourself
which pitch sequence you want;
10. go to the von Neumann Musical Space and draw
something. Click the left mouse button to fill
a cell and the right one to clear a cell;
11. when finished, click the left mouse button
on the start button. It should invert its
colour and start the performance. The demon
initial state is printed at von Neumann
Musical Space 1 and the life automata
algorithm evolves at von Neumann Musical
Space 2;
12. If the 'stop' button is clicked, CAMUS prints
out the current demon state. To carry on the
performance click 'go on' and to stop
click 'break', both using the right mouse
button;
13. To save it, after click on 'break' you
must click 'save'. Then you will be asked for
a file name will on the command line (top left
side). Input a proper file name. After saving
it you must click 'skip' to finish this
operation. CAMUS assumes that you may wish
to save it again as another type. Remember,
you can save it as CAM or as PRO;
You have seen some of the fundamental operations of the program. You should now be able to explore other possibilities. Always bear in mind that you can make changes in your MIDI synthesizer as well!
1.4. The life's game rule.
The original life's algorithm deals with the default rules suggested by CAMUS, that is, the Conway's rule. But the user can try other possibilities, by changing the values on the life/death rule panel.
CAMUS life's algorithm accepts any com- bination that satisfies the following conditions:
i) life's minimum value (left side) should be
less than life's maximum (right side) and
different by at least by two units;
ii) death's minimum value (left side) should
be less than death's maximum (right side);
2. A tutorail for using CAMPLAY.
CAMPLAY is a very simple program to operate. You just select a distribution option and a file. Just to remind you, CAMPLAY plays only CAM files. A CAM file is generated by CAMUS and by PROCAMUS. But its format is quite simple and you can write your proper CAM files (if you really want to!) using an ASCII editor or even by writing a simple program to generate it. It is a quite useful tool for further experiments with other cellular automata algorithms or to test the results of stochastic music on a von Neumann musical space.
CAMPLAY loads a CAM file into an internal cellular structure and plays it in sequence. When it finishes, it restarts from the begining. But the musical output will not be the same. As you may already know, cellular automata music files do not determine duration values but a general shape abstraction. The values are calculated in real time by means of a distribution option.
2.1. The screen components.
The previous figure illustrates the CAMPLAY's operational screen. Each part is described here:
a. von Neumann Musical Space 1: this space is used to print the demon cell's state used for determining the MIDI channel;
b. von Neumann Musical Space 2: this space is used to print a life's cell according to its coordinates (triad's intervals). It is cleared when the time step changes (that is, for each new configuration);
c. roll score: used to print out the shape's representation of cells while in being played;
d. coordinate bar: this shows the position of the current cell in von Neumann musical spaces;
e. load button: used to select a file to be loaded into CAMPLAY's internal strucutre in order to be performed;
f. clear: to clear everything;
g. quit/ stop/ go on button: 'quit' button is clicked to quit the program, 'stop' to temporarily interrupt a performance and 'go on' if you want to continue after having stopped;
h. start/ break button: after loading a CAM file 'start' must be clicked to start the per formance. When a performance is interrup ted 'break' must be clicked if you want to stop it;
i. overlap bar: indicates when a pitch's duration overflows the whole duration of a cell. Up to three pitches can be overlapping to other cells at the same time;
j. distribution panel: used to set up the distribution option from which duration values are worked out. There are 3 op tions: uniform, linear and triangular;
2.3. The operational flowchart.
2.4. CAM file format.
A CAM file is composed of a sequence of cells. Each cell has 11 elements separated by comma and enclosed between brackets, as shown below:
[1,42,23,22,64,64,64,5,0,3,300]
[1,36,23,30,64,64,64,4,0,3,300]
[1,47,24,22,64,64,64,4,2,3,300]
[1,46,25,23,64,64,64,0,8,3,300]
[1,45,25,29,64,64,64,0,0,3,300]
[1,37,27,23,64,64,64,0,0,3,300]
[1,38,27,27,64,64,64,0,4,3,300]
[1,39,28,25,64,64,64,2,0,3,300]
[1,44,28,26,64,64,64,8,1,3,300]
[2,43,19,20,20,20,20,8,4,1,100]
[2,40,20,18,27,27,27,3,0,1,171]
[2,41,20,19,34,34,34,10,5,1,142]
[2,42,20,20,41,41,41,12,0,1,113]
Each cellular element is described as follows:
[stp,ptc,it1,it2,dy1,dy2,dy3,tgg,dur,tmb,spe]
. stp = indicate which configuration a cell belongs to;
. ptc = fundamental triad's pitch (MIDI number);
. it1 = first interval to determine the second pitch from the fundamental. It corresponds to the horizontal coordinate of von Neumann musical space;
. it2 = second interval to determine the third pitch calculated from the second pitch. It corresponds to the vertical coordinate of von Neumann musical space;
. dy1 = fundamental pitch's dynamics (MIDI key velocity);
. dy2 = second pitch's dynamics;
. dy3 = third pitch' dynamics;
. tgg = typology's trigger code;
. dur = typology's duration code;
. tmb = timbre (MIDI channel). It corresponds to the state of a cell on the demon cellular automata;
. spe = delay. Length of a cell. The minumum value is 20 and the maximum 9999. As spe increases the length of a cell also increases. Suggested values are between 300 and 1200;
______________________________________________________
DOWNLOAD AND LINKS
Home Page of Eduardo Reck Miranda
Find out more about Eduaro and his publications as well.There are also links to download the WINDOWS version of CAMUS. You will see a vast difference between the Atari and Windows version but the concepts remain the same.
E-Mail:tconrardy@hotmail.com
Copyright © 2001 Tim Conrardy