Friday 2 September 2011

Open Music - Tone Rows and the Maquette

Today's algorithmic composition tutorial looks at using OpenMusic to manipulate and generate musical material from tone rows.

If you haven't already got OpenMusic 6.5 installed you can download OpenMusic free for Mac and PC here. IRCAM supply a number of tutorials but you can also look through the OpenMusic tutorials available here.

Jump to the end of the post to hear some sample algorithmic music output from this patch.

Serialism developed as a framework for composing and organising atonally and moves away from the sense of a key by giving each pitch equal worth. This patch starts with a tone row from the Berg Violin Concerto:

   G, Bb, D, F#, A, C, E, G#, B, C#, Eb, F

All pitches must be played through in order, in order to provide more melodic material the tone row can be transposed to any pitch, inverted and played backwards.

First we'll create our tone row (to create a new object CMD click and type in to the box created).

The repeat-n function will create 12 copies of our tone row. To evaluate the output of any object or function hold CMD and click on the output. Look in the Lisp listener window to see the results:

Add in the following objects by holding CMD, clicking and naming as below:

The addition + and multiply x objects are created by typing OM+ and OM*. These objects perform the maths on element of the list operating a little differently to the standard Lisp + and * functions. Once you've created the objects you can find a short description by selecting it and keying CMD I.

Double click on the omloop function and make the contents of omloop look like this:

This will loop through each element of the list and add a randomly selected octave deviation: om-random chooses between -1, 0 and 1, the result is multiplied by 12 (-12, 0, 12) and this is added to the next element of the tone row.

Now we need to create the rhythms. We'll create these using rhythm trees, for a recap check OpenMusic Rhythm Trees part one and OpenMusic Rhythm Trees part two.

Create a new object (CMD click) and type patch. This create a subpatch, these subpatches are usually red and can be renamed once you've created it. Make the contents of your subpatch look like this:
This subpatch creates our rhythm tree my making a random selection from a list of notes and rests, rests are given negative values. In the above example, I've used some less common rhythmic values:

  Note values: 1/16 1/13 1/12 1/7
  Rest values: 1/5 1/11 1/7

The choice between note or rest is made using the choix object from the OMAlea library. The OMAlea library is part of the standard OpenMusic distribution but you need to make sure that you have loaded it up in OpenMusic preferences. See the previous OMAlea post for details.

Your final patch should look something like this:
Click on the voice object then press 'v' to evaluate the patch. You should then see the voice object populated with your melody. Pressing 'p' will play the voice object so that you can hear it. If you don't like the output you can try evaluating it again.

Adding in an om-random and om+ function will allow us to randomly tranpose each tone row:

We'll now create a variation of this patch that will play through the tone row harmonically. This patch uses a lot of the same material so to save yourself some work, select the patch in your workspace and press CMD D to duplicate your patch.

We'll now make some modifications. The new om-random function chooses between 1 and 5 notes to be played at a time, the group-list function will group the pitches from om-loop into groups based on this random selection:
Select the voice object and press 'v' to evaluate then 'p' to play.
If you want to have more or fewer rests change the probability value in the rhythm subpatch.

Finally we'll create a small composition from our patches using a maquette. The Maquette is a special container object that incorporates a time element. A Maquette can contain any musical object e.g. chord, voice, poly and other patches. You can create a maquette from the file menu (new Maquette) using the shortcut CMD2 or CTRL clicking in your workspace.

Once you've created your maquette drag one of your patches on to it. We'll make some changes to the patch to make the composition more interesting so select the patch in the Maquette and press 'a' the patch should turn red and is now an abstraction. Click on this patch and add the tempout and tempin objects (CMD click and type tempout, CMD click and type tempin). 
The tempout object needs to be connected but the tempin object (labelled self) does not as it takes its input from the position in the maquette. Here I've dragged on 3 copies of the melodic tone row patch to start with and have modified the probability input to choix in the rhythms subpatch so that each subpatch increases in note density i.e .the first subpatch has a probability of .3, the second .5 and the third .8. This is followed by two versions on the harmonic tone row patch again with increasing density and then a final melodic patch.

Make sure you have a tempin and tempout object in each patch.
You can hear some sample output from this OpenMusic algorithmic composition tone row patch here:
This example explores some of the basic possibilities of using tone rows and the maquette to organise patches. Try to modify and expand these patches to explore your own ideas, for example integrating retrograde and inverted versions of the tone row and experimenting further with rhythmic density and development.

More algorithmic composition tutorials soon!

No comments:

Post a Comment