Octave up and down

an3

2016-12-19 16:30:06

can anyone tell me what the easiest way is to set up an - and + octave buton (3 octaves), where i can transpose the incoming signal on channel one (from my novation circuit 1st synth channel) to the midi out (other synths) accordingly to the button push - or +

florian

2016-12-21 22:24:56

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

an3

2016-12-30 20:52:05

it works :). but the note off is not working so well: i get random double triggering and when i switch octaves when a note on is being triggered the synth hangs (give a sustaining note that doesnt go off:>> i guess because no note off to the last triggered note before switching the octave

an3

2017-01-02 23:44:52

ok i assgined an all notes off command to both - and + octave switch, short dropout though, which makes the 1st note after an octave change drop out 8 out of 10 times. is there another way of dealing with the octave changes smoothly
:>> i mean i guess making the octave transpose before the note off from the last triggered note causes this ?!

sjcaldwell

2017-01-02 23:56:08

an3 wrote:ok i assgined an all notes off command to both - and + octave switch, short dropout though, which makes the 1st note after an octave change drop out 8 out of 10 times. is there another way of dealing with the octave changes smoothly
:>> i mean i guess making the octave transpose before the note off from the last triggered note causes this ?!
Instead of immediately sending note off, have it trigger a delay timer and have the delay timer issue the note off. Probably make the delay timer a one time timer that triggers at 5-10ms.