Showing posts with label rhythm. Show all posts
Showing posts with label rhythm. Show all posts

Thursday, 20 May 2010

Algorithmic Composition with OpenMusic | Markov Chains and Rhythm

Previous Algorithmic Composition tutorials have looked at using Markov Chains in OpenMusic, using some of the functions available in the OMalea library to analyse the pitches of a MIDI file and create new algorithmic compositions based on these.

Today we're looking using Markov Chains in OpenMusic to generate rhythmic patterns for algorithmic compositions.

 Algorithmic Composition Markov Chain OpenMusic
Our previous OpenMusic tutorial used these functions from OpenMusic's OMalea library:
  • ana-mark to analyse a MIDI file to create a transition table of pitches and
  • markov1 to generate a new algorithmic composition based on the transition table.
Although we were previously using our Markov chain to analyse and generate pitches, you can also use ana-mark and markov1 from the OpenMusic OMalea library to generate rhythms.

Thursday, 25 March 2010

Tone Rows And Rhythm

In today's post we're looking at another relatively simple example that introduces two more ideas:
  • working tone rows (serialism)
  • working with rhythm
As it's the firs time we've used this ideas in patches we'll use fairly straight forward implementations. Here's a summary of what our algorithmic composition patch will do:

1. Specify a tone row, this will always be played through in order. The tone row is specified by using pitch classes in a message that is then stored in a table, the tone row in the example patch is

11 10 7 1 3 0 2 9 6 4 8 5 though feel free to change this.


2. Specify a series of rhythms. For this we've assumed a tempo of 60BPM. So:
  • Whole note (semibreve) = 4000ms
  • 1/2 note (minim) = 2000ms
  • 1/4 note (crotchet) = 1000ms
  • 1/8 note (quaver) = 500ms
  • 1/16 note (semiquaver) = 125ms
  • 1/32 note (demisemiquaver) = 62.5ms

3. Assuming a consistent tempo of 60BPM makes working with rhythmic values easy, we don't have to stick to 60 BPM however. If we multiplied each value by 2 the tempo would be twice as quick. We've included a simple tempo multiplier slider that is connected to a multiply object:


4. We'll follow serialist principles, each note of the row is of equal importance and the tone row is played through in order. A counter counts from 0 to 11, this is connected to a tabread object that read through our tone row:

5. We can transpose the tone row to any starting pitch, play it backwards and invert it. Here, once the counter has completed we trigger a random transposition for the next play through the row, we also invert the row every other time:

6. The notes of the tone row can appear in any octave. We've included a random transposition of octaves for each note:


7. For each note we're choosing a random rhythm from our rhythm list. You can see some of the rhythms are set to 0, so if this rhythm is chosen we'll have two notes played at once:

8. Here is the final patch (click on the image to see a larger image):


I recommend creating the patch yourself by copying the layout of the screenshot, however you can also download the patch here.