compo 2.1 - Quick Start
© 2001 Bruno Lartillot
![]() |
compo provides you with two main interfaces : midi and score, respectively for earing and visualizing your works. For instance : (midi (note (:c)(:d)(:e))) plays the structure denoted by (note (:c)(:d)(:e)) (which is explain below), while (score (note (:c)(:d)(:e)) draws the corresponding score. Try both please.
If no sound occurs, the solution is to play the midi file compo.midi, created by the (midi) command.
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 (score) command.
Let the melodic cell :
You can simply obtain this score by typing in a natural way :
(score (note (:c)(:d)(:e)(:f)(:g)(:a)))
To ear it, just type :
(midi (note (:c)(:d)(:e)(:f)(:g)(:a)))
A compo structure is the expression starting by (note..., given as an argument to the (score) or the (midi) command. As you can see, a quarter sequence is simply obtain by typing (note, 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 write that as a compo structure is (we doesn't specify the enclosing (score) or (midi) command anymore, but let you choose which of both to use, whether you want to see or ear the result) :
(note (: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. Thus, 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 :
(note :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 :
(note (: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 :
(note 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 :
(note 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 :
(note
(:treble :super (:c)(:d)(:e))
(:bass :super (:c3)(:g2)(:c3)) )
The keyword :super simply indicates that the substructures are superposed (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 :
(note 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.