Tutorial 13 - Random construction of a sequence II

Introduction to durations, vels and legato


Introduction to durations, vels and legato


Functions used

CHORD-SEQ, om-random, repeat-n, and dx->x.



In this example we will extend our random procedure to the durations and dynamics of our sequence.


Patch structure

A: We will use the same patch as in tutorial 10. om-random will be in its normal mode. This is because here we don't need repeated notes.

B: We will use the same patch for durations with different parameters. om-random will generate values going from 100ms. to 500ms. Durations and onsets in all music editors are expressed in milliseconds (for CHORD, CHORD-SEQ).

C: In order to have concording durations and onsets one must put repeat-n in eval-once mode. Notice that a module is generally evaluated as many times as it is connected. Here repeat-n is connected to two different objects (dx->x, and CHORD-SEQ) and so it would be evaluated twice giving two different randomly generated lists. That is why one must put repeat-n in the eval-once mode in order to have concording durations and onsets.

D: In order to have coordinated onsets and durations (i.e no overlapping notes or rests between notes) we will use dx->x function which will output a list of the resulting onsets. For example, if we have a list of durations such as '(500 125 350) dx->x will output '(0 500 625 975) which represents a list of onsets in milliseconds. One must keep in mind that the CHORD-SEQ object accepts a polyphonic stream of notes. Each event will have an onset and a duration.


For instance, if we connect a midifile having a polyphony of two voices to the first input <self> of CHORD-SEQ we can notice that CHORD-SEQ will inherit all the midi data correctly .

The midi file

Checking 'dur' in the left menu of CHORD-SEQ will show the durations of notes. Here we have two voices on two different midi channels.

E: We will use again the same patch as in A, using values from 10 to 120 representing midi velocity values.

F: Connecting a number to the second input of all three repeat-n modules will evaluate n-times all of these.


G: Using the <legato> input of CHORD-SEQ (eight input) is a practical way to get rigth durations following a given list of onsets. <legato> in this case must be 100.


Here is one sequence in a CHORD-SEQ that was generated using this patch. Notice that the CHORD-SEQ editor is in page mode (activated in the palette by the second button starting from the right). We have also checked the dynamic option in the popup menu.