This forum is read-only. Please post new topics in our Q&A forum.

Octave up and down

General discussion about MIDI Translator

Moderators: florian, DvlsAdvct

Post Reply
an3
Power User
Posts: 28
Joined: Mon Dec 19, 2016 4:27 pm

Octave up and down

Post by an3 » Mon Dec 19, 2016 4:30 pm

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 +

User avatar
florian
Bome Software: Founder
Posts: 2435
Joined: Thu Apr 28, 2005 10:09 pm
Location: Munich, Germany
Contact:

Re: Octave up and down

Post by florian » Wed Dec 21, 2016 10:24 pm

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
Power User
Posts: 28
Joined: Mon Dec 19, 2016 4:27 pm

Re: Octave up and down

Post by an3 » Fri Dec 30, 2016 8:52 pm

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
Last edited by an3 on Mon Jan 02, 2017 11:45 pm, edited 1 time in total.

an3
Power User
Posts: 28
Joined: Mon Dec 19, 2016 4:27 pm

Re: Octave up and down

Post by an3 » Mon Jan 02, 2017 11:44 pm

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 ?!

User avatar
sjcaldwell
Power User
Posts: 167
Joined: Tue Sep 20, 2016 11:05 pm

Re: Octave up and down

Post by sjcaldwell » Mon Jan 02, 2017 11:56 pm

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.

Post Reply