Map Channels of multiple Novation Launchpads

florian

2013-02-09 14:33:25

A user asked how he can use Midi Translator Pro to use 4 Launchpads controlling one application (Hauptwerk in his case).
The problem is that all Launchpads transmit on MIDI channel 1.
Now he wants Launchpad 1 to be mapped to channel 1 to Hauptwerk, Launchpad 2 to be mapped to MIDI Channel 2, etc.

florian

2013-02-09 14:41:49

General Working
For this kind of application, the common "put MT Pro between device(s) and MIDI software" technique is used:
  1. Open/select the input and output ports of the MIDI device(s) in MT (here: all Launchpads)
  2. Use a virtual MIDI port ("Midi Translator Virtual 1") for relaying the MIDI messages to the software
  3. in MT, open the MIDI Router, and draw these routes:
    Launchpad 1 -> Midi Translator Virtual 1
    Launchpad 2 -> Midi Translator Virtual 1
    Launchpad 3 -> Midi Translator Virtual 1
    Launchpad 4 -> Midi Translator Virtual 1
    Midi Translator Virtual 1 -> Launchpad 1
    Midi Translator Virtual 1 -> Launchpad 2
    Midi Translator Virtual 1 -> Launchpad 3
    Midi Translator Virtual 1 -> Launchpad 4
  4. in the target MIDI Application (Hauptwerk), deselect all Launchpad ports, and only open "Midi Translator Virtual 1" for input and output.
Now you should be able to control the MIDI application with any of the launchpads just the same as if you had opened them directly in the MIDI Application.

This general setup is also explained in more detail in the user's manual in MT.

Channel Mapping
Now for channel mapping, we use MT's translators.
Because there are 2 different approaches, I present them both in separate posts.

florian

2013-02-09 15:01:47

Approach 1: Simple but Cumbersome
The idea is to map each possible message.

Map Device to Application
In MT, in the left preset list, create a new preset, say "From Launchpad 2". Open the preset properties by right-clicking on the new preset. There, go to Default MIDI ports, say "project specific ports", and select "Launchpad 2" as input, and "Midi Translator Virtual 1" as output.

Now create a new translator in the translator list, and name it e.g. "Map Note On". Choose MIDI as incoming type, and enter:
"90 pp qq"
90 is the MIDI message "Note On" (commonly used for notes or buttons) on MIDI Channel 1.
pp and qq are MT variables so that this translator will work for all Note On messages. pp will be set with the note/button number, and qq with the velocity or value.
Check "swallow" to prevent the original (Channel 1) message to be passed on to the application, too.
You can check "Stop processing" in the translator's general options because this is the only translator for this message from this device.
Now switch to the Outgoing panel and select MIDI as outgoing type, and enter this MIDI message:
"91 pp qq"
91 is Note On on MIDI Channel 2. pp and qq are just passed through.

To recapitulate, the translator looks something like:

Code: Select all

Translator 0: Map Note On Channel
 [x]stop processing
Incoming: MIDI 90 pp qq
 [x]swallow
Outgoing: MIDI 91 pp qq
Now you repeat this for other MIDI messages, most notably:

Code: Select all

Map Note Off: "80 pp qq" -> "81 pp qq"
Map Controller: "B0 pp qq" -> "B1 pp qq"
Map Program Change: "C0 pp" -> "C1 pp"
Map Application to Device
If you want to pass data from the application back to the device, create another set of presets for the return path:
In MT, create a new preset, "To Launchpad 2". In its preset properties, select "Midi Translator Virtual 1" as input and "Launchpad 2" as output.

Now create translators similar to the above ones, but vice versa:

Code: Select all

Map Note On: "91 pp qq" -> "90 pp qq"
Map Note Off: "81 pp qq" -> "80 pp qq"
Map Controller: "B1 pp qq" -> "B0 pp qq"
Map Program Change: "C1 pp" -> "C0 pp"
Repeat for other devices
Now you can duplicate the presets above (the Preset menu has a Duplicate function) and adapt for Launchpad 3 and 4. E.g. Note On on MIDI Channel 3 is "92" and on Channel 4 it is "93".

Done!
Now that should be everything. If you've worked out such a preset, it would be nice to post it here!
Of course, once you got this working, it's where the MT fun starts: now you can do other translations, create switches to also control MIDI channels 5-8, etc.

florian

2013-02-09 15:24:10

Using rules, it is possible to create much more elegant translators, but at the cost of simplicity.
Maybe it's not worth bothering with this solution, but it's good to know anyway :)

So instead of using separate translators for every different MIDI message, we only use one translator for all and "calculate" the translation in the rules.
And to avoid having 6 (or 8 ) presets with one translator in it each, we're gonna consolidate all "From Launchpad" translators in one preset, and the same for the "To Launchpad" translators.

From Launchpads
In an empty project, create a new preset "From Launchpads". Open the preset properties, and ONLY select a default output MIDI port: "Midi Translator Virtual 1".
Now in that preset, create a first translator, it looks like this:

Code: Select all

Translator 0: From Launchpad 2
  [x]stop processing
Incoming: MIDI tt pp qq
  [x]swallow
  [x]on specific port: Launchpad 2
Rules:
 tt=tt+1
Outgoing: MIDI tt pp qq
Now we also use a variable for the MIDI message status "tt", and just increase it by one, which effectively changes 90 to 91, etc.

Duplicate the translator for Launchpad 3, where you should then use "tt=tt+2" and adapt the specific MIDI Input port, and for Launchpad 4 accordingly ("tt=tt+3").

To Launchpads
For the way back from Application to Launchpads, create a preset where only the Default Input Port is set to "Midi Translator Virtual 1".

Code: Select all

Translator 0: To Launchpad 2
  [ ]stop processing
Incoming: MIDI tt pp qq
  [x]swallow
Rules:
 tt=tt-1
 uu=tt & 15
 if uu!=0 then exit rules, skip Outgoing Action
Outgoing: MIDI tt pp qq
  [x]on specific port: Launchpad 2
At first, we do the expected: subtract 1 from the MIDI status to convert MIDI channel 2 to MIDI Channel 1. However, This translator will be called for all channels, so in the next two rules we extract the new channel into a new variable uu, and then verify that the new channel is 0 (i.e. MIDI Channel 1). It can only be 0 now if it was 1 before. For all other cases, we do not use this translator.
Also, because this translator is not the only one for this message, uncheck "stop processing". Otherwise the following translators would not get the messages on different channels.
Duplicate this translator for Launchpads 3 and 4, and adapt the "tt=tt-1" accordingly, and the specific output port, too.

2-byte messages[/b/]
Now the above only works for three-byte messages, so if you want to support 2-byte MIDI messages, it is inevitable to duplicate all translators where you just remove the "qq" from incoming and outgoing actions.