3 <img src="/images/MIDI_transform.png" alt="MIDI transformation">
4 <figcaption>The MIDI transformation dialog</figcaption>
8 Considering the numerical nature of MIDI events, it can be useful to
9 transform a MIDI region by applying mathematical operations to it. Ardour
10 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.
14 To access the Transform tool, right click the MIDI region >
15 <em>name_of_the_region</em> > MIDI > Transform….
19 First, the property to be modified in the <kbd class="menu">Set</kbd> field
20 is selected, then the target value is changed using the two fields that
21 follow. If more operands are desired, the <kbd class="menu">+</kbd> button is
22 clicked to create new lines. Any superfluous line can be removed by clicking
23 on the <kbd class="menu">-</kbd> button on the right side of the line to be
24 removed. Finally, once everything is set as desired, the <kbd
25 class=menu>Transform</kbd> button is pressed to apply the transformation.
29 In the image above, the Transform tool has been used to add a bit of
30 humanization, by slightly changing the velocity of each note of the region by
31 a random number between -19 and +19 from its original velocity. So the
32 following three operations are applied:
36 <li>Set velocity to this note's velocity</li>
37 <li>+ a random number from 1 to 20</li>
38 <li>- a random number from 1 to 20</li>
42 Each note will trigger a unique calculation, where its velocity will be
43 increased by a random number between 1 and 20, then decreased by a random
44 number between 1 and 20. This will result in a new velocity being applied to
45 the note, which will be the original velocity plus or minus 19.
49 The parameters that can be transformed are:
53 <li>MIDI note number (e.g. <a href="@@midi-notes-ref">C2 is note number 24,
54 C#2 is 25, etc.</a>)</li>
55 <li>MIDI velocity (the volume of the note, between 0 and 127)</li>
56 <li>start time (in beats)</li>
57 <li>length (in beats)</li>
62 and the transformation can be based on any of the following:
67 <li>the previous note's</li>
68 <li>this note's index (number of the note, i.e. the first one is 0, the second
70 <li>exactly (for a constant value, between 1 and 127)</li>
71 <li>a random number from <em>lower</em> to <em>higher</em> (<em>lower</em> and
72 <em>higher</em> being constant values between 1 and 127)</li>
73 <li>equal steps from <em>lower</em> to <em>higher</em> (<em>lower</em> and
74 <em>higher</em> being constant values between 1 and 127)</li>
78 The mathematical operators are:
83 <li>- (subtraction)</li>
84 <li>* (multiplication)</li>
85 <li>/ (euclidian division)</li>
86 <li>mod (remainder of the euclidian division)</li>
90 Keep in mind that while the Transform tool is powerful, it is not infallible.
91 Things like division by zero (which does nothing), using the note's index and
92 thinking that it starts at one (instead of zero), etc. can yield