2017-01-03 04:01:45 -05:00
2017-11-15 09:34:10 -05:00
< p >
Considering the numerical nature of MIDI events, it can be tempting to apply
mathematical transformations to our MIDI regions by using mathematical
2018-02-13 16:42:39 -05:00
operations. Ardour makes it very easy and powerful with the Transform tool.
2017-11-15 09:34:10 -05:00
< / p >
< figure >
< img src = "/images/MIDI_transform.png" alt = "MIDI transformation" >
< figcaption > MIDI transformation< / figcaption >
< / figure >
2017-02-14 10:20:06 -05:00
< p > To access the Transform tool, right click the MIDI region > < em > name_of_the_region< / em > > MIDI > Transform… < / p >
2017-11-15 09:34:10 -05:00
2017-02-14 10:20:06 -05:00
< p > 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.< / p >
2017-11-15 09:34:10 -05:00
< p >
In the picture above, the Transform tool has been used to add a bit of
2017-02-14 10:20:06 -05:00
humanisation, by slightly changing the velocity of each note of the region, by
2018-02-13 16:42:39 -05:00
a random number between -19 and +19 from its original velocity. So
2017-11-15 09:34:10 -05:00
three operations are applied:
< / p >
2017-01-04 09:32:00 -05:00
2017-01-03 04:01:45 -05:00
< ul >
< li > Set velocity to this note's velocity< / li >
< li > + a random number from 1 to 20< / li >
< li > - a random number from 1 to 20< / li >
< / ul >
2017-11-15 09:34:10 -05:00
< p >
Each note will trigger a calculation of its own, so its velocity will be
increased by a random number between 1 and 20, then decreased by a random
number between 1 and 20.
< / p >
2017-01-04 09:32:00 -05:00
2017-11-15 09:34:10 -05:00
< p >
The properties that can be computed are:
< / p >
2017-01-04 09:32:00 -05:00
2017-01-03 04:01:45 -05:00
< ul >
2017-02-14 10:20:06 -05:00
< li > note number (e.g. C2 is note number 24, C#2 is 25 and < a href = "@@midi-notes-ref" > so on< / a > )< / li >
2017-01-03 04:01:45 -05:00
< li > velocity (the global intensity of the note, between 0 and 127)< / li >
< li > start time (in beats)< / li >
< li > length (in beats)< / li >
< li > channel< / li >
< / ul >
2017-01-04 09:32:00 -05:00
2017-11-15 09:34:10 -05:00
< p >
and the calculation may be based on the following properties:
< / p >
2017-01-04 09:32:00 -05:00
2017-01-03 04:01:45 -05:00
< ul >
< li > this note's< / li >
< li > the previous note's< / li >
2017-11-15 09:34:10 -05:00
< li > this note's index (number of the note, i.e. the first one is 0, the second
is 1, etc.)< / li >
2017-01-03 04:01:45 -05:00
< li > exactly (for a constant value, between 1 and 127)< / li >
2017-11-15 09:34:10 -05:00
< li > a random number from < em > lower< / em > to < em > higher< / em > (< em > lower< / em > and
2017-02-14 10:20:06 -05:00
< em > higher< / em > being constant values between 1 and 127)< / li >
2017-11-15 09:34:10 -05:00
< li > equal steps from < em > lower< / em > to < em > higher< / em > (< em > lower< / em > and
2017-02-14 10:20:06 -05:00
< em > higher< / em > being constant values between 1 and 127)< / li >
2017-01-03 04:01:45 -05:00
< / ul >
2017-01-04 09:32:00 -05:00
2017-11-15 09:34:10 -05:00
< p >
The mathematical operators can be:
< / p >
2017-01-04 09:32:00 -05:00
2017-01-03 04:01:45 -05:00
< ul >
< li > + (addition)< / li >
2018-02-13 16:42:39 -05:00
< li > - (subtraction)< / li >
2017-01-03 04:01:45 -05:00
< li > * (multiplication)< / li >
< li > / (euclidian division)< / li >
2018-02-13 16:42:39 -05:00
< li > mod (remainder of the euclidian division).< / li >
2017-01-03 04:01:45 -05:00
< / ul >
2017-11-15 09:34:10 -05:00
< p class = "note" >
2018-02-13 16:42:39 -05:00
All these operations can be very handy, as long as there is a mathematical way
2017-11-15 09:34:10 -05:00
to achieve the targeted 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.
< p >
< p >
Very interesting results can nevertheless be created, like humanizing
(randomizing the velocity, start time and duration of all the notes), creating
arpeggios, automating tedious tasks, transposing, etc.
< / p >