--- layout: default title: Transforming MIDI - Mathematical operations menu_title: Transforming MIDI ---
Considering the numerical nature of MIDI events, it can be tempting to apply mathematical transformations to our MIDI regions by using mathematical operations. Ardour makes it very easy and powerfull with the Transform tool.
To access the Transform tool, right click the MIDI region > name_of_the_region > MIDI > Transform...
First, select the property you want to modify in the 'Set' field, then change the target value using the 2 following fields. If you want to add more operands, click the "+" sign to create new lines. You can remove a superfluous line using the "-" sign on the right of the newly created line.
In the picture above, we've used the Transform tool to add a bit of humanisation, by slightly changing the velocity of each note of the region, by a random number between -19 and +19 from it's original velocity. So we've used 3 operations :
The properties that can be computed are :
All this operations can be very handy, as long as you find a mathematical way to achieve your goal. Beware though of odd "border cases" : division by zero (which does nothing), using the note's index and forgetting it starts at 0 and not 1, etc.
You can nevertheless create very interesting results, like humanizing (randomizing the velocity, start time and duration of all the notes), creating arpeggios, automating tedious tasks, transposing, etc.