Map MIDI channel

florian

2009-10-06 08:53:36

A user asked this by email:
I have a MIDI controller. What I want is to be able to press a CC button and have all following MIDI messages broadcast on a certain MIDI channel. Is this possible using MIDI Translator and how do I do it?

florian

2009-10-06 08:56:30

Yes, this is certainly possible with Midi Translator Pro.

In general, you'd use a "global variable" (say "gc" for global channel) to store the MIDI channel that you want all MIDI messages to be sent. Note that internally in MIDI, channels are zero based, i.e. 0...15 correspond to MIDI channels 1..16. Therefore, if gc has value 0, you'll transmit on MIDI channel 1, if gc is 9, you'll transmit on channel 10.

Now for how to setup MT to change all outgoing messages to MIDI channel 10:
Create translators like this:

Code: Select all

Translator 1: "Set channel to 10"
Incoming: MIDI <CC button message>  [use MIDI capture]
Rules: gc = 9
Outgoing: <none>

Translator 2: "Map all 3-byte MIDI messages"
Incoming MIDI: pp qq rr
Rules: 
 pp = pp & 240
 pp = pp | gc
Outgoing MIDI: pp qq rr

Translator 3: "Map all 2-byte MIDI messages"
Incoming MIDI: pp qq
Rules: 
 pp = pp & 240
 pp = pp | gc
Outgoing MIDI: pp qq
I admit that the rules for changing the MIDI channel are not obvious to non-programmers. But for that you have us :)

It should be relatively easy to adapt the first translator (or create additional copies of it) for different channel mappings. Translator 2 and Translator 3 above can always remain the same, you'd just add translators that modify the MIDI channel.

Florian

florian

2009-10-06 09:01:31

What I just thought: if you want to use a controller (say a knob) to directly set the MIDI channel, that's easily possible, too. Replace translator 1 above with the following to select MIDI channel 1 when the knob is in its lowest position, then, when turning, the MIDI channel will be gradually increased, and at maximum, you'll map all messages to MIDI channel 16. I assume you're sending CC#1 (Modulation wheel) on MIDI channel 1, but you can use MIDI capture to see which controller is actually sent by your knob/slider/wheel/...

Code: Select all

Translator 1: "Set channel from controller value"
Incoming: MIDI B0 01 pp
Rules: gc = pp / 8
Outgoing: <none> 
Hope that helps!
Florian

timeboy

2009-10-07 03:16:43

You. Are. My. Hero

I've been trying to figure out how to do this for 3 days. I can't thank you enough!

Now I'm off to go buy the full version :)

THANK YOU!!!