Hi an3,
yes, that's relatively easy with MT Pro.
This is the scheme:
Code: Select all
Translator 0: transpose Note On
Incoming: MIDI Note On, Channel 1, any note, set pp to note number. Any velocity, set qq to note number
[x] swallow
Rules:
pp=pp+gt
if pp>127 then exit rules, skip outgoing action
if pp<0 then exit rules, skip outgoing action
Outgoing: MIDI Note On, Channel 1, note number: pp, velocity: qq
Translator 1: transpose Note Off
Incoming: MIDI Note Off, Channel 1, any note, set pp to note number. Any velocity, set qq to note number
[x] swallow
Rules:
pp=pp+gt
if pp>127 then exit rules, skip outgoing action
if pp<0 then exit rules, skip outgoing action
Outgoing: MIDI Note Off, Channel 1, note number: pp, velocity: qq
Translator 2: Octave +
Incoming: MIDI <use MIDI Capture for the Octave + button>
Rules:
if gt<36 then gt=gt+12
Outgoing: none
Translator 3: Octave -
Incoming: MIDI <use MIDI Capture for the Octave - button>
Rules:
if gt>-36 then gt=gt-12
Outgoing: none
Explanation:
We use the global variable gt to store the number of semitones to transpose. 12 semitones is one octave. Now in Translator 0, if a Note On comes in on channel 1, we get the note number in local variable pp. In the rules, we simply add gt to the note number, because note number is specified in semitones. We need to verify that we don't exceed MIDI range of 127 notes and ignore the MIDI note if it's above 127 or below 0.
Translator 1 does the same, but for Note Off.
Translator 2 has as incoming action the "Octave +" button. You don't say which kind of button that is. If it's a MIDI button, use MIDI Capture in the incoming action. In the rules, gt is increased by 12 (one octave), but only if it's below 36, which is 3 octaves (your stated maximum).
Translator 3 does the same for Octave -. It reduces gt by 12.
I hope that makes sense, please let us know!
Florian