Warning: mysql_connect(): Can't connect to MySQL server on 'mysql.sourceforge.net' (111) in /home/groups/c/co/compo/htdocs/inc/variables.php on line 7

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/groups/c/co/compo/htdocs/inc/variables.php on line 8

Warning: mysql_query(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) in /home/groups/c/co/compo/htdocs/inc/lib.stats.php on line 17

Warning: mysql_query(): A link to the server could not be established in /home/groups/c/co/compo/htdocs/inc/lib.stats.php on line 17

Warning: mysql_close(): no MySQL-Link resource supplied in /home/groups/c/co/compo/htdocs/inc/lib.stats.php on line 18

Compo 3 - Quick Start

© 2002 Bruno Lartillot

Compo provides you with two main interfaces : midi and score, respectively for earing and visualizing your works. For instance : (realize (midi (:c)(:d)(:e))) plays the structure denoted by (midi (:c)(:d)(:e)) (which is explain below), while (realize (score (:c)(:d)(:e))) draws the corresponding score. Try both.

If no sound occurs, try to play the midi file compo.midi, created by the (realize (midi)) command at the root of the compo directory, with any tool able to play midi files.

If the score does not appear immediately on your screen (which actually works only on a Macintosh), you can see the result by opening with ghostview the file cmn-1.eps, created by the (realize (score)) command at the root of the compo directory.

Let the melodic cell :

You can simply obtain this score by typing in a natural way :

(realize (score (:c)(:d)(:e)(:f)(:g)(:a)))

To ear it, just type :

(realize (midi (:c)(:d)(:e)(:f)(:g)(:a)))

A compo structure is the expression starting by (midi... or (score.... From now on, we show example using the score form, but the applies to midi.

As you can see, a quarter sequence is simply obtain by typing (score, followed by a list of note names, each preceded by a colon and enclosed between parenthesis, plus a leading parenthesis balancing the first one.

A note name can be followed by an alteration (cs for c sharp, bf for b flat), an octave number (as c3 or bf5 for instance). Note that the compo syntax is case unsensitive, that is df is equivalent to DF.

Let us introduce some rhythm in our melodic cell :

The way to obtain this is:

(realize (score (:c :h)(:d)(:e)(:f)(:g :8th)(:a :8th)))

Note the keywords :h (which stands for an half) and :8th which stands for an eighth. Hence, the duration is specified only when it differs from a quarter.

Now, just insert before the subnote list a height keyword like :d for example :

(realize (score :d (:c :h)(:d)(:e)(:f)(:g :8th)(:a :8th)))

You have your melodic cell transposed a whole tone upwards, just because D stands a whole tone upwards C :

Typing :bf3 instead of :d would cause the melodic cell to be transposed a whole tone downwards, because BF3 is a whole tone downwards C (abreviation of C4).

As you can see, it is easy to transpose any structure, simply by inserting a height name. It is possible to perform such a transposition in a part rather than in a whole structure. For instance, our first example above :

could have been written :

(realize (score (:c)(:d)(:e) (:f (:c)(:d)(:e))))

because the sequence <f g a> can be considered as <c d e> transposed a fourth upwards.

The interesting point here, since we have the same substructure <c d e> two times, is that it is possible to write the example in a better way :

(realize (score a=((:c)(:d)(:e)) a (:f a)))

Don't panic ! It remains simple : a=(anything) means that you give any arbitrarily complex structure the name a (as a shortcut). In the rest of the expression, each time a appears, it is replaced by the anything it stands for. So if you replace the two occurence of a above by its "value" which is ((:c)(:d)(:e)), you get actually the same result as in the previous form.

What is true for heights is true for durations. Suppose that in addition to have the second occurence of a transposed a fourth upwards, you want it to be twice faster, that is three eighths rather than three quarters :

You just have to type :

(realize (score a=((:c)(:d)(:e)) a (:f :8th a)))

You can associate to any substructure a voice indication like :bass or :soprano. The simplest way to write this two voice cell :

is :

(realize

  (score :sync

(:treble (:c)(:d)(:e))

(:bass (:c3)(:g2)(:c3)) ) )

The keyword :sync simply indicates that the substructures are synchronized (they start at the same time) rather than juxtaposed (the disposition in three lines of the expression is just for lisibility and has no incidence in the result).

Finally, here is an example of a substructure to be repeated 4 times :

(realize (score 4*((:c)(:g)(:e)(:g))))

With a little of practice, you will see that this way of describe music is rather easy and efficient. There is a lot of advanced features in compo. Once familiarized with those basis, we encourage you to take a look at the reference to go further.

So good luck, we hope compo will be usefull for you.