The Ardour Manual

Edit in GitHub

Transforming MIDI—Mathematical Operations

MIDI transformation
The MIDI transformation dialog

Considering the numerical nature of MIDI events, it can be useful to transform a MIDI region by applying mathematical operations to it. Ardour makes this kind of powerful transformation very easy with the Transform tool. The tool makes possible things such as humanizing (randomizing the velocity, start time and duration of all the notes), creating arpeggios, automating tedious tasks, transposing, etc.

The Transform tool is accessed by right-clicking the MIDI region > name_of_the_region > MIDI > Transform….

First, the property to be modified in the Set field is selected, then the target value is changed using the two fields that follow. If more operands are desired, the + button is clicked to create new lines. Any superfluous line can be removed by clicking on the - button on the right side of the line to be removed. Finally, once everything is set as desired, the Transform button is pressed to apply the transformation.

In the image above, the Transform tool has been used to add a bit of humanization, by slightly changing the velocity of each note of the region by a random number between -19 and +19 from its original velocity. So the following three operations are applied:

Each note will trigger a unique calculation, where its velocity will be increased by a random number between 1 and 20, then decreased by a random number between 1 and 20. This will result in a new velocity being applied to the note, which will be the original velocity plus or minus a value <19.

The parameters that can be transformed are:

and the transformation can be based on any of the following:

The mathematical operators are:

While the Transform tool is powerful, it is not infallible. Things like division by zero (which does nothing), using the note's index and thinking that it starts at one (instead of zero), etc. can yield unexpected results.