USER GUIDE TO LOCO

USER GUIDE

 

for the Apple Macintosh with Microsoft/LCSI Logo

copyright 1988, Peter Desain and Henkjan Honing

INTRODUCTION

LOCO is a system for (music) composition. It is built on the general programming language Logo. It can be used as a workbench for experimenting with musical structures, both for beginners and professionals. It is a non-realtime system, which means that composing and playing don't take place at the same time. LOCO consists of three subsystems: the composition system, the score system, and the instrument system (see figure 3). The composition system consists of a set of program generators, programs that write programs. They can be used to create the so-called choice systems that will make a composition according to the rules provided by the composer. The connection between the composition system and the instrument is via the score system. The instrument system uses standard MIDI codes to control any kind of MIDI synthesiser.
The scope of this manual is a step by step introduction to LOCO. It is not intended as a demonstration of the full power of LOCO, nor to explain theories about music composition. The underlying philosophy and design decisions, as well as some other examples of LOCO are given elsewhere (Desain/Honing 1986,1988).

GETTING STARTED THE VERY FIRST TIME

This chapter explains the configuration actions needed to start LOCO for the very first time at your site. For most users, this will already have been done by someone else, so they can skip this chapter and start reading chapter 3.

Needed Equipment

Note: LOCO runs only under the Finder (Do not use the Multifinder).

For workshops and classes in computer music composition it is often wise to concentrate first on LOCO itself, not being distracted by all kinds of fascinating audio equipment. For the same reason we advise to use synth's without a keyboard.

Step 1: Make a Working Copy of Your LOCO Disk

Make a copy of the LOCO disk in the normal way (See your Macintosh manual). Store the original disk savely and use the working-copy for the configuration process.

Making copies of LOCO for other than backup purposes is prohibited. They can be traced back to the original purchaser who will be held responsible for all.

Step 2: Connecting a MIDI Interface and Synthesiser

Connect the MIDI interface to the modem port. For primitives adjusting the default settings see 6.8.
Now connect the MIDI-out of the interface to the MIDI-in on your synthesiser with a standard MIDI cable. Make sure the synthesizer can receive MIDI information on channel 1 (see your synthesiser manual). Additional synthesisers may be "daisy chained". They can receive MIDI on subsequent channel numbers.

Step 3: Configuring Your LOGO

Make a new copy of your Microsoft Logo application and call it LOCO Logo (see page 204 of the Microsoft Reference Manual).
After this startup the Preferences Program on your Microsoft disk. (If you use a Macintosh with HFS, make sure both the Preferences Program and a copy of the Logo application are not inside a folder. The Preferences Program is affected by the HFS system and can not find primitive sets that are in folders, see Addendum Microsoft Manual).
Next, copy the LOCO primitive set called LOCOPSET.P into your LOCO Logo using the Primitive Set Mover (see page 214/217 of the Microsoft Reference Manual).
Finally, if you want to adjust your copy of Logo to your personal needs (i.e. more workspace) select Memory & Font Preferences in the Preferences Program to adjust the allocation of memory and default font (see page 207/210 of the Microsoft Reference Manual).
The configuration phase is now done. You can quit the Preference Program and copy LOCO Logo to your working copy of the LOCO disk. Place them in the same folder.
You can now continue with chapter 3.

GETTING STARTED

In this chapter it is assumed that your Macintosh is connected to a synthesizer, receiving MIDI data at channel 1, and the LOCO disk is assumed to be configured appropriately.

You can then startup LOCO by double-clicking on the file called "LOCO startup".

Feel free to stop reading the next chapters at any time and do some experiments of your own - doing is the best way of learning.

THE SCORE SYSTEM

After starting LOCO, a score writing and playing system is available. This score system is to be considered as a tool - it is in itself not so interesting (see figure 3). But with this tool you can make programs that write music on the score in their own (slow) way. After that the score can be played as fast as you like by your synthesiser.
On a score you can write simple and compound musical objects. An example of a simple musical object is a NOTE:

[NOTE duration pitch loudness]

It has 3 inputs: a duration, a pitch and a loudness. The duration signifies how long the note is going to last. The pitch is a number counting the semi-tone steps of an equal-tempered scale, middle C has pitch number 60 (see chapter 6.7 for a table of MIDI pitches). The loudness is a number between 0 and 1. Later we will define translations from well-known names (like middle C and pianissimo) to these numbers. Let's first write one simple short loud middle C note to the score and play it.

WRITE [NOTE 1 60 1]
PLAY

(In all examples plain text is user input and italic is computer output.)

In Microsoft Logo there is no prompt. You can type text everywhere in a text window. To let the interpreter actually do the instruction, press the Enter key after each command line (see page 11/12 of the Microsoft Reference Manual).

If we write more notes they will be added one after another to the score. Let's try some other inputs:

WRITE [NOTE 2 60 1]
WRITE [NOTE 1 58 1]
PLAY

Of course we also need rests:

WRITE [REST 1]
WRITE [NOTE 2 58 0.7]
PLAY

When you make a typing error you can use the common Logo cursor keys and line editing commands (see page 9 of the Microsoft Reference Manual).
Clover-S stops the playing of the score and clover-H for Help information also works for LOCO primitives.
Also other Logo constructs like repetition are usable within LOCO:

REPEAT 4 [WRITE [NOTE 1 67 1]]
PLAY

If you are bored with such repeated notes or with typing all these notes yourself, and want to let the computer compose the piece for you, you should start reading chapter 5 and come back later to hear all about the facilities of the score system. On the other hand, if you like to explore one thing at a time just continue reading. Let's talk about polyphony now. We can start from the beginning of the score (POSITION 0) and add a second layer of notes. Or we can see were we are in the score, go to a specific position, and continue from there.

POSITION 0
WRITE [NOTE 3 51 1]
WRITE [NOTE 1 52 1]
PLAY
POSITION?
4
POSITION 2
WRITE [NOTE 1 50 1]
PLAY

The created score in a pianoroll notation looks like this:

Figure 1. Pianoroll notation of the created score.

The score can be played at different tempos. A tempo number gives the number of time-units per minute. So our little score of 11 time-units will last for 11 seconds when played at tempo 60:

TEMPO?
60
PLAY
TEMPO 120
PLAY
TEMPO 60

A score can be saved to disk, erased and retrieved at a later time. SAVE.SCORE will open a Save dialog box and asks for a filename.

SAVE.SCORE
ERASE.SCORE
PLAY
WRITE [NOTE 1 60 1]
PLAY
LOAD.SCORE
PLAY

LOAD.SCORE overwrites the current score. So if you want to keep it, save it before reading a new score from disk. LOAD.SCORE opens a Load dialog box and lets you select the file that has to be loaded.

Next to creating multiple layers of notes on the score by writing layer per layer and using POSITION, we can make compound musical objects at once (note that later these objects will be calculated by some kind of program, but for the moment we will type them in).

Musical objects that will sound at the same time are constructed using P for Parallel. A parallel object will last as long as its longest component.

ERASE.SCORE
WRITE [P [[NOTE 4 60 1][NOTE 8 63 1]]]
PLAY
WRITE [P [[NOTE 4 57 1][NOTE 4 59 1][NOTE 4 63 1]]]
PLAY

You can make a sequential ordering of musical objects into one compound object by using S for Sequence.

ERASE.SCORE
WRITE [S [[NOTE 1 60 1][REST 1][NOTE 1 61 1]]]
PLAY

P and S are functions that have a list of musical objects as argument.

Sometimes you want to use notes with smaller durations. Although it is permitted to use fractional durations, a change in the meaning of the time-unit is often more effective. The default value of time-unit is a sixteenth, each note of duration 1 will be a sixteenth note - lasting for 0.25 seconds. If you set the time-unit to a quarter note, and since at tempo 60 you will have 60 of them each minute, a note of duration 1 will last for one second. Changing the time-unit will only affect the writing of the score (way of notating) and not the actual playing. If this all seems too complicated to you, just remember the following. If your tempo has to be set at an unreasonable high value to get the result you want, then it is better to write the score with a smaller time-unit and vise-versa.TIMEUNIT is usually set before you write the score, TEMPO while playing it (see figure 3).

ERASE.SCORE
TIMEUNIT?
1 / 16
TIMEUNIT 1/4
WRITE [NOTE 1 60 1]
WRITE [NOTE 1 61 1]
PLAY
ERASE.SCORE
WRITE [NOTE 1 60 1]
WRITE [NOTE 1 61 1]
PLAY

Note that LOAD.SCORE and ERASE.SCORE reset TIMEUNIT to its default value 1/16. That is why in the example after ERASE.SCORE the written notes sounded shorter. TIMEUNIT was set to its default value.

Most MIDI synthesisers are equiped with different sounds called instruments, timbres or voices. The playing instrument can be changed using INSTRUMENT. It has a number as input. This is the same number you would use when selecting the instrument manually on the synthesiser itself.

ERASE.SCORE
WRITE [NOTE 4 54 1]
INSTRUMENT 3
PLAY
INSTRUMENT?
3
INSTRUMENT 22
PLAY

If you have a synthesiser that can handle more instruments at once (this is called multi-timbral), or if you have more synthesisers connected in a "dais y chain", each receiving MIDI information on a different channel, you can write music that has more then one part. If you do not have this, skip the explanation of PART.
PART changes the current part of the score you are writing (i.e. the MIDI channel the notes will go to when played). And INSTRUMENT changes the instrument playing the current part.

ERASE.SCORE
PART?
1
WRITE [NOTE 1 60 1]
WRITE [NOTE 2 63 1]
INSTRUMENT 3
PLAY
PART 2
POSITION 0
WRITE [NOTE 2 55 1]
WRITE [NOTE 1 56 1]
INSTRUMENT 11
PLAY
PART 1
INSTRUMENT 10
PLAY

The resulting score can be visualised as follows:

Figure 2. Pianoroll notation of the given score. Note that LOAD.SCORE and ERASE.SCORE reset PART and TIMEUNIT to their default values, 1 and 1/16 respectively.

Advanced control of timing achievable with the LOCO system will be demonstrated next.
When writing scores the position in the score can be manipulated by the musical objects themselves. [PRE object ] will be written to the score just before its current position without changing it. This is useful for objects like grace notes.

ERASE.SCORE
REPEAT 4 [WRITE [NOTE 1 60 1]]
PLAY
POSITION 3
write [pre [note 0.2 50 1]]
PLAY

The PRE object is prefixed to the current position in the score, i.e. it already happened when it's asked to start at position 3 (you can hear that the PRE note is not on the same beat as the first layer). PRE can also be combined in S.

POSITION 4
REPEAT 4 [WRITE [S [[PRE [NOTE 0.15 70 1]][NOTE 1 62 1]]]]
PLAY
POSITION?
8

PRE behaves like a prefix attached to [NOTE 1 62 1], but it does not change the duration, nor the timing of the S object.The POST object is postfixed to the position in the score. This means that it can be written to the score at the current position without changing it. Mind that writing a PRE object at position 0 of the score is an error (This is like writing a musical object on your desk instead of on the music paper). The next example will yield a chord:

ERASE.SCORE
POSITION?
0
WRITE [POST [NOTE 1 70 1]]
POSITION?
0
WRITE [NOTE 4 60 1]
POSITION?
4
PLAY
WRITE [POST [NOTE 1 70 1]]
POSITION?
4
PLAY

To make clear the information flow in the score system we summarize the commands in a picture:

Figure 3. Information flow in the score system.

USE OF CHOICE SYSTEMS

Composition can be looked at as the making of choices. Choices can be made by the composer or by the computer. In the last case the composer (you!) will have to give the rules to the computer. One of the possible rules is a random choice from a fixed set of possibilities. We create such a program, a so-called "choice system", by means of the program generator ALEATORIC

ALEATORIC "COLOR [RED GREEN ORANGE]
SHOW COLOR
RED
SHOW COLOR
ORANGE
REPEAT 4 [SHOW COLOR]
GREEN
GREEN
ORANGE
RED

Note that the program COLOR is just a normal Logo program, except that it is created by a program (by ALEATORIC). COLOR can be used as any Logo program, like in the example where its result is printed repeatedly. (If you do not know about REPEAT you should have a quick look in the Logo manual here.) Note also that COLOR does not know anything about colors, it just gives you a word as result.

The name of the program (e.g. COLOR) can be chosen freely, but mind not to use LOCO primitive names as listed in chapter 10, or any logo primitives (see Microsoft Reference Manual). Also the use of names starting with a dot is discouraged: LOCO uses them internally.

In the window called "LOCO Work" an overview of all currently available choice-systems is displayed.

Now we are going to use ALEATORIC to construct a musical example, creating a melody with pitches chosen randomly from a fixed set of possibilities.

ERASE.SCORE
ALEATORIC "PITCH [60 65 67 69 70]
REPEAT 12 [WRITE [NOTE 1 PITCH 1]]
PLAY

Until now, we have been supplying a number as the second argument of NOTE. Now the program PITCH calculates such a pitch number for us. Those of you who know about scales, and like to experiment with them, can immediately start creating random melodies in major, minor, or other scales, by selecting a suitable list of possibilities for PITCH (For MIDI pitch/key numbers see chapter 6.7).
Note that when you PLAY the score a second time you will hear the same notes, while when you repeat the previous example (writing a new sequence of notes with a random pitch) you will hear a different score.

We also can make random rhythms using ALEATORIC:

ERASE.SCORE
ALEATORIC "DURATION [1 2 4]
REPEAT 12 [WRITE [NOTE DURATION 60 1]]
PLAY
REPEAT 12 [WRITE [NOTE DURATION PITCH 1]]
PLAY

In the last example we combined the two mechanisms of choosing random pitches as well as durations. LOCO supports lots of ways of combining very simple mechanisms into complex ones. We encourage the free experimenting with these combinations. They are so manifold that it is impossible to describe them all, just like describing all possible Logo programs is an infinite task. When you want to start all over with a new composition you can use ERASE.WORK. It will erase all choice systems. ERASE.CHOICE can be used for erasing just one choice system.

ERASE.WORK
SHOW COLOR
I don't know how to color

If you have a predefined order in mind, in which the choices have to appear, you can use the generator ORDERED instead of ALEATORIC. ORDERED would make the right traffic light, compared to the COLOR example we did with ALEATORIC, but we will give a musical example here:

ERASE.SCORE
ORDERED "PITCH [60 61 64]
REPEAT 9 [WRITE [NOTE 1 PITCH 1]]
PLAY
ORDERED "DURATION [1 2]
REPEAT 12 [WRITE [NOTE DURATION PITCH 1]]
PLAY

In the second part of the example we put a duration order of two elements against a melody line of three elements. Can you figure out what goes on?
We can use loudness to accentuate one of the patterns:

ORDERED "LOUDNESS [1 0.7]
REPEAT 12 [WRITE [NOTE DURATION PITCH LOUDNESS]]
PLAY
ORDERED "LOUDNESS [1 0.7 0.7]
REPEAT 12 [WRITE [NOTE DURATION PITCH LOUDNESS]]
PLAY

Select an instrument on your synthesiser that is sensitive for loudness (for which 0.7 and 1 are distinguishable). Sometimes you need the possibility to reset a choice system in its initial state, as if you never used it. You can use RESET.CHOICE here (or RESET.WORK that resets all choice systems). (In the LOCO Work window you see how LOUDNESS was generated:

ORDERED "LOUDNESS [1 0.7 0.7]).

SHOW LOUDNESS
1
SHOW LOUDNESS
0.7
RESET.CHOICE "LOUDNESS
SHOW LOUDNESS
1

A third principle of choice used by many composers is serial choice. A serial choice of a given set of possibilities will first use all of them before one can be chosen again. Think of a serial choice as a bucket full of possibilities (written on little pieces of paper). Each time a new value is needed, one piece of paper is taken out of the bucket at random without putting it back. Only when the bucket is empty all of the possibilities (pieces of paper) are put back in the bucket and the process is continued.

ERASE.SCORE
SERIAL "PITCH [60 63 65]
REPEAT 24 [WRITE [NOTE 1 PITCH 1]]
PLAY
ERASE.SCORE
SERIAL "DURATION [1 2 3]
REPEAT 24 [WRITE [NOTE DURATION PITCH 1]]
PLAY
POSITION 0
REPEAT 24 [WRITE [NOTE DURATION PITCH - 12 1]]
PLAY

When we use a serial choice for making rhythms, as we did in the second part of the example above, a kind of feeling for measure is created. This happens because after each 1 + 2 + 3 = 6 time-units we can be sure a note will start. This even becomes more apparent when a second layer of the same kind of notes is added. This second layer is transposed down by an octave (12 semitones) by using just plain Logo arithmetic. Everywhere in LOCO the full power of Logo is available for these kinds of calculations.

Our next example will give a demonstration of the orthogonal nature of LOCO: everything can be coupled to everything. We will use a choice system to generate a list of possibilities that another choice system can choose from.

ALEATORIC "DIVISION [[3 3][4 2][5 1]]
SHOW DIVISION
[4 2]
SHOW DIVISION
[3 3]
SERIAL "DURATION "DIVISION
SHOW DURATION
2
SHOW DURATION
4
SHOW DURATION
5
RESET.CHOICE "DURATION
ERASE.SCORE
REPEAT 12 [WRITE [NOTE DURATION 50 1]]
PLAY
POSITION 0
REPEAT 12 [WRITE [NOTE DURATION 61 1]]
PLAY

In this example serial choice system DURATION only consults DIVISION when the previous list of possibilities is exhausted. Note that when you use these kind of stacked choices the name of the choice system must be quoted when it is used as an input to another choice system. Otherwise, Logo considers it just a program, calculates its result and gives that as a constant value to the second program generator.

The next example shows another way of stacking choice systems. One choice system can choose the name of another one that has to be evaluated.

ERASE.SCORE
ERASE.WORK
ALEATORIC "HIGH [60 61 62]
ALEATORIC "LOW [50 51 52]
ORDERED "REGISTER [HIGH HIGH LOW]
EVALUATED "PITCH "REGISTER
SHOW REGISTER
HIGH
SHOW PITCH
61
REPEAT 24 [WRITE [NOTE 1 PITCH 1]]
PLAY

REGISTER will return the name of a choice system. PITCH will use that name and run it once (in this example it produces a pitch number).
To make your programs more readable you can use CONSTANT to give names to your musical structures, as in the following two examples:

ERASE.SCORE
ALEATORIC "PITCH [60 61 62]
CONSTANT "LOUD.NOTE [NOTE 1 PITCH 1]
CONSTANT "SOFT.NOTE [NOTE 1 PITCH 0.6]
CONSTANT "CHORD [P [[NOTE 4 60 1][NOTE 4 63 1][NOTE 4 64 1]]]
REPEAT 12 [WRITE [S [CHORD LOUD.NOTE SOFT.NOTE]]]
PLAY

ERASE.SCORE
ERASE.WORK
CONSTANT "MINOR [60 62 63 65 67 68 70]
CONSTANT "MAJOR [60 62 64 65 67 69 71]
ALEATORIC "PITCH "MINOR
REPEAT 24 [WRITE [NOTE 1 PITCH 1]]
ALEATORIC "PITCH "MAJOR
REPEAT 24 [WRITE [NOTE 1 PITCH 1]]
PLAY

If you want to use an element by element translation of names you can use TRANSLATED that has a list of pairs (a kind of dictionary) as its third input.

ERASE.SCORE
ERASE.WORK
ALEATORIC "TONE [C D E F G A B]
TRANSLATED "PITCH "TONE [[C 60][D 62][E 64][F 65][G 67][A 69][B 71]]
SHOW TONE
E
SHOW PITCH
69
REPEAT 12 [WRITE [NOTE 1 PITCH 1]]
PLAY

When you need choices with different probabilities, you can use WEIGHTED. It works like ALEATORIC, but assigns to each possibility a different probability. The next example shows the use of weighted durations. Half of the choices will be of duration 1, the rest will be of duration 2 or, with a slight chance, of duration 8.

ERASE.SCORE
WEIGHTED "DURATION [[1 0.5][2 0.4][8 0.1]]
REPEAT 12 [WRITE [NOTE DURATION 55 1]]
PLAY

Sometimes you want to choose from a (very) large number of possibilities. It then can be much easier to give only the borders in between which can be chosen. With SCALED you need a minimum, a maximum, and a resolution defining the size of the scaled steps in between (as if we used ALEATORIC with a list of equal spaced numbers between a minimum and a maximum). The larger the resolution, the less possibilities there are within the given range.

ERASE.SCORE
SCALED "WHOLE.TONE.PITCH 60 72 2
SHOW WHOLE.TONE.PITCH
72
SHOW WHOLE.TONE.PITCH
62
SHOW WHOLE.TONE.PITCH
66
REPEAT 12 [WRITE [NOTE 1 WHOLE.TONE.PITCH 1]]
PLAY

A whole tone scale has equal steps between every preceding note. You maybe want to compare the sound and making of this scale with the ones you made with ALEATORIC. When you want to use negative values, mind that Logo is weak in handling negative numbers. Be sure to put parentheses around them, so they will be interpreted in the right way (e.g. (-2)). The next is an example using PRE for precise timing control of a grace note attached to a regular beat, while the duration fluctuates.

ERASE.SCORE
SCALED "DURATION 0.1 0.5 0.01
CONSTANT "GRACE.NOTE [PRE [NOTE DURATION 50 1]]
CONSTANT "BEAT [NOTE 2 52 1]
WRITE [REST 1]
REPEAT 12 [WRITE [S [GRACE.NOTE BEAT]]]
PLAY

The first REST is to prohibit the writing of a GRACE.NOTE before the beginning of the score (see explanation of PRE). Now we arrive at what we can call higher order choice systems. They are only useful when build on top of other choice systems. A very useful one is ITERATIVE which can repeat results a number of times. An example:

ERASE.SCORE
ORDERED "PATTERN [64 62 64 67]
REPEAT 16 [WRITE [NOTE 2 PATTERN 1]]
PLAY
ITERATIVE "DOUBLE.PATTERN "PATTERN 2
SHOW DOUBLE.PATTERN
64
SHOW DOUBLE.PATTERN
64
SHOW DOUBLE.PATTERN
62
SHOW DOUBLE.PATTERN
62
RESET.WORK
POSITION 0
REPEAT 32 [WRITE [NOTE 1 DOUBLE.PATTERN + 12 1]]
PLAY

Well, in this example a lot of things happened. Let's look at them step by step. The first thing you played was a simple repeated pitch pattern or melody of four notes. The second time the same pattern is doubled, as well as in tempo as in notes. The double tempo is defined by a smaller duration value, but, what is much more interesting, the doubled notes were derived from PATTERN by taking its result and repeating every new value two times. Because we checked out DOUBLE.PATTERN on the monitor half way, we used RESET.WORK to reset DOUBLE.PATTERN to its initial state. Otherwise both patterns wouldn't be that synchronous (DOUBLE.PATTERN, would start half-way).
PATTERN and DOUBLE.PATTERN could also be called Balungan and Pekingan, respectively, if it was a first step in making a simulation of a Javanese gamelan styled composition.
Construct for yourself an iterative choice system that lets another choice system take care of the repetition input (the third input of ITERATIVE).
Another higher order program generator is CUMULATIVE. Next to the name of the program to generate it has an increment and a start value.

ERASE.SCORE
CUMULATIVE "CHROMATIC.PITCH 1 48
SHOW CHROMATIC.PITCH
48
SHOW CHROMATIC.PITCH
49
SHOW CHROMATIC.PITCH
50
REPEAT 12 [WRITE [NOTE 1 CHROMATIC.PITCH 1]]
PLAY

Although this is not a very shocking example, CUMULATIVE is a strong principle. It, as its name suggests, cumulates all inputs, beginning with its starting value (48 in the example above). The next values are determined by the increment value. That can be a number (as in the previous example), but also, and more interesting, a choice system, as is THIRD in the next example:

ERASE.SCORE
ALEATORIC "THIRD [3 4 -3 -4]
CUMULATIVE "BROWN.THIRD.PITCH "THIRD 60
SHOW BROWN.THIRD.PITCH
60
SHOW BROWN.THIRD.PITCH
57
REPEAT 24 [WRITE [NOTE 1 BROWN.THIRD.PITCH 1]]
PLAY

Brown melodies, as made here with CUMULATIVE, have a more flowing nature compared to aleatoric or white melodies.

The next program generator to be introduced is TRANSITIVE. With this you can link choice systems in a network, each one choosing a next one to use. Like all generators it has the name of the program to be generated as its first argument. The second argument is a starting state.

ERASE.WORK
ERASE.SCORE
WEIGHTED "I [[II 0.2][IV 0.6][V 0.2]]
WEIGHTED "II [[I 0.7][IV 0.3]]
CONSTANT "IV "V
CONSTANT "V "I
TRANSITIVE "PROGRESSION "I
SHOW PROGRESSION
I
SHOW PROGRESSION
IV
SHOW PROGRESSION
V
SHOW PROGRESSION
I
TRANSLATED "CHORD "PROGRESSION [[I C][II D][IV F][V G]]
CONSTANT "C [P [[NOTE 2 48 1] [NOTE 2 52 1] [NOTE 2 55 1]]]
CONSTANT "D [P [[NOTE 1 50 1] [NOTE 1 53 1] [NOTE 1 57 1]]]
CONSTANT "F [P [[NOTE 2 48 1] [NOTE 2 53 1] [NOTE 2 57 1]]]
CONSTANT "G [P [[NOTE 3 50 1] [NOTE 3 53 1] [NOTE 2 55 1][NOTE 3 59 1]]]
REPEAT 12 [WRITE CHORD]
PLAY

Figure 4. Graphical representation of PROGRESSION.

After all this typing you can save the compositional work by using SAVE.WORK. LOAD.WORK reads it back in again. (SAVE.WORK and LOAD.WORK are in fact quite like the Logo primitives SAVE and LOAD, you can use the File menu items as well (see page 6/7 of the Microsoft Reference Manual). Only LOAD.WORK also refreshes the LOCO Work window).

SAVE.WORK "PROGRESSION
ERASE.WORK
LOAD.WORK "PROGRESSION

The last two program generators are used when lists of values are needed instead of isolated values.
Sometimes it's useful to have available a scale of values (as used implicitly in SCALED). This can for example be used as argument for SERIAL. The arguments of SCALE are a minimum, a maximum, and a resolution (like SCALED).

ERASE.SCORE
ERASE.WORK
SCALE "WHOLE.TONE.SCALE 60 72 2
SHOW WHOLE.TONE.SCALE
[60 62 64 66 68 70 72]
ALEATORIC "WHOLE.TONE.PITCH "WHOLE.TONE.SCALE
SHOW WHOLE.TONE.PITCH
70
SHOW WHOLE.TONE.PITCH
64
REPEAT 12 [WRITE [NOTE 1 WHOLE.TONE.PITCH 1]]
PLAY

Of course, the arguments for SCALE can also be calculated by another choice system.

ERASE.SCORE
CUMULATIVE "MAXIMUM 1 60
SCALE "PITCHES 60 "MAXIMUM 1
SERIAL "PITCH "PITCHES
REPEAT 24 [WRITE [NOTE 1 PITCH 1]]
PLAY

This example produces a constantly widening serial melody.
If you want to collect a certain number of outcomes from a choice system into a list, it can be passed as an argument to another choice system, using COLLECT. In the next example a number of trills are made.

ERASE.SCORE
ALEATORIC "PITCH [60 62 64 65 67 69 72]
COLLECT "PITCHSET "PITCH 2
SHOW PITCHSET
[69 62]
SHOW PITCHSET
[60 67]
ITERATIVE "REPEATED.PITCHSET "PITCHSET 4
ORDERED "TRILL "REPEATED.PITCHSET
REPEAT 36 [WRITE [NOTE 0.5 TRILL 1]]
PLAY

Some more nice sounding examples:

 ERASE.SCORE
ERASE.WORK
SCALE "MY.SCALE  60 71 1
ORDERED "RANDOM.PITCH "MY.SCALE
COLECT "SCALE.OF.THREE "RANDOM.PITCH 3
SERIAL "SERIAL.PITCH "SCALE.OF.THREE
ORDERED "ACCENT [1 0.7 0.7]
ORDERED "DURATION [1 0.5 0.5]
REPEAT 32 [WRITE [NOTE DURATION SERIAL .PITCH ACCENT ]]
PLAY

ERASE.SCORE
ERASE.WORK
ORDERED "MASK[1 0 0 1 0]
ORDERED "SCALE  .PITCH [60 62 64 65 67 69 70]
ITERATIVE "PITCH "SCALE  .PITCH "MASK
REPEAT 32 [WRITE [NOTE 1 PITCH 1]]
PLAY

 

SUMMARY OF COMMANDS

Writing Scores

Playing Scores

Storing Scores

Musical Objects

Program Generators

Choice Systems Management

MIDI Pitch Numbers

Figure 5. MIDI pitch/key numbers

MIDI Interface Primitives

SEPERATE USE OF LOCO COMPONENTS

Separate Use of the Choice Systems

Choice systems can be used separately e.g. for creating pictures or poems. Load both the files LOCO General Primitives and LOCO Program Generators. Two short examples are listed below.

LOAD "LOCO\ General\ Primitives
LOAD "LOCO\ Program\ Generators

SERIAL "ANGLE [-30 -70 -10 20 50 40]

Define in the Editor:

TO STRANGE.LINE
 REPEAT 6 [RIGHT ANGLE FORWARD 4]
 FORWARD 12
END

Now you can type in the text window

REPEAT 100 [STRANGE.LINE PU FORWARD 50 PD]

Another example with text:


ORDERED "SPEECH [I STUT T ER SOME TIMES, AND SOMETIMES NOT]
ALEATORIC "NUMBER [1 1 2]
ITERATIVE "MAX.HEADROOM "SPEECH "NUMBER
REPEAT 12 [TYPE MAX.HEADROOM TYPE "\ ]
I STUT T T ER SOME TIMES, AND AND SOMETIMES NOT NOT 





MIDI Output


The MIDI output can be use separately.You can sent an arbitrary byte
(number from 0 to 255) through the MIDI interface. In this way you can
write programs controlling your synthesiser directly.
The next example shows a procedure that starts your tape recorder ("250" is
the MIDI sequence to start a MIDI sequencer):


TO START.SEQUENCER
  MIDIOUT 250
END




See the manual of your synthesiser for details on the MIDI codes that can
be used.
7.3 Score System

The score system can be used separately to make your own music composing
program tool. This will give you the score primitives. A quick example:


LOAD "LOCO\ General\ Primitives
LOAD "LOCO\ Score\ Primitives

Define in the Editor:


TO DOWN :FROM :TO
 IF :FROM < :TO [STOP]
 WRITE NOTE 1 :FROM 1
 DOWN :FROM - 1 :TO
END




And try out in the text window


DOWN 70 50
PLAY




REFERENCES


Desain, P., & Honing, H. (1986). LOCO, composition microworlds in Logo.
In
P. Berg (ed.), Proceedings of the 1986
International Computer Music Conference. 109-118.
San Francisco: Computer Music Association.


Desain, P., & Honing, H. (1988). LOCO: a composition microworld in
Logo.
Computer Music Journal, 12(3), 30-42.


INDEX







ACKNOWLEDGEMENTS


We like to thank all our colleagues at the Center for Art, Media and
Technology (CKMT of the Utrecht Academy of Arts) for their support and
facilities, Sterling Beckwith for general support and suggestions in the
naming of the LOCO primitives, Irene Lubberink of the COCO Foundation, and
Eric Brown for advise.

USEFUL ADDRESSES


Microsoft Corporation (Logo)
10700 Nothup Way
Box 97200
Bellevue, WA 98009
USA

Applica (MIDI interface)
P.O. Box 1404
NL-6501 BK Nijmegen

Utrecht Academy of Arts
Center for Art, Media and Technology
P.O.Box 1520
NL-3500 BM Utrecht

COCO Foundation
P.O.Box 1037
NL-3500 BA Utrecht