Selecting port routing with MIDI cc

Hi

Looking for advice on how best to use Bome Box to manage a bunch of MIDI synths, fx pedals/processors etc. Some are multitimbral and overall there are too many to allocate each a dedicated MIDI channel. I use an Octatrack and Torso T-1 as the MIDI sequencers and have one controller keyboard. All devices have their own MIDI ports, no Thrus.

For any given project/track would need absolute max of 10 devices simultaneously. I’m trying to think of the easiest way of routing everything.

One option that came to mind is using one of the Octatrack MIDI tracks (let’s say channel 1) and the 10 CC controls it offers to determine the port routing of channels 2-11. I can then set MIDI channels of the other Octatrack and T-1 tracks to 2-11 but have them routed to devices determined by the CC values.

I’ve looked at the video tutorials but can’t figure out exactly how to do the above. Specifically, I get how to write translators that change MIDI channels but I don’t see how to dynamically change the port routing based on CC values. Explicit example:

Midi Channel 1
CC1, value 0: route midi channel 2 data to Synth A on Port A channel 1
CC1, value 1: route midi channel 2 data to Synth B on Port B channel 1
.
.
CC2, value 0: route channel 3 data to Synth A on Port A channel 1
CC2, value 1: route channel 3 data to Synth B on Port B channel 1

Unless there’s a better way entirely to do this!

Cheers

Hi and welcome back!

Well this might not be the best way to do this but the below example follows somewhat your logic.

The First preset is for housekeeping actions like setting up global variables.
The second preset is for routing functions
Translator 0.0 takes the input from either CC1 or CC2 and sets the routes as you have described.

We use the global variable g0 for the Octatrack routes and g1 for the T1 Routes. We use bitmapping as follows:

// Set up routing table
// Input channel bit 0-3
// output channel bit 4-7
// output destination bit 8-11

We define device IDs for the ports
Device ID 0 is Octatrack incoming port
Device ID 1 is T1 incoming port
Device ID 0 is the outgoing port to Synth A
Device ID 1 is the outgoing port to Synth B

Translator 1.1 does the bit stuffing into the global variables that will control the routing for each incoming device.

Presets 2 and 3 are for Octatrack and T1 Data processing to various output devices. They also handle the MIDI CH routing based on the bitmap.

They each have only their input device port set.
Each one has processing for a 2 byte and 3 byte messages and have an outgoing action of Perform ‘Send MIDI’. Perform is a new feature of MT Pro 1.9.1.

We pass parameters to Perform and the remaining translators look at those parameter to see if

  1. The call is meant for that translator
    • It is a 2 byte or 3 byte message
    • Whether the device destination matches the target device
  2. Processes channel mapping based on the bitmap

Right now I have only set up translators for Synth A and Synth B so for additional outgoing ports you will need additional pairs of translators.

Then the translators pass the outgoing MIDI message to the outgoing port of that translator

For If you want additional SysEX routing for non channel messages, then you will need to set up a different scheme to turn on and off those routes as MIDI thru paths.

As I said, there may be a better way to do this but when you are talking about combinations of MIDI device routes and channel mapping it gets quite complex. Note also that there is only 1 route and channel map per incoming device. If you want to route a sequencer to 2 output devices, then this method will not work. You would likely need to create a device bitmap and then a time to send the incoming MIDI message to each device that is turned on in the bitmap.

I hope this helps!
MIDI-Routing-CH-and-Port-2024-02-12.bmtp (13.0 KB)

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz

Hi Steve

Thanks very much for coming back to me with this example project.

I think I follow how the translators work. In essence does it iterate through all the ‘Send Midi’ translators for both the Octatrack and T1 presets and only output a MIDI message when the port and channel conditions are met?

If I have devices connected to 20+ ports will the overhead/latency of this approach start to become significant, given that every MIDI message will be processed through dozens of translators? Is there a way of exiting the preset once the translator has been reached that sends the outgoing MIDI message?

Would it be more efficient to expand the rules in the 2- and 3-byte message translators effectively to have a switch construct using if-then rules to activate a specific Perform translator for the respective port?

I guess all these implementations are having to work around the fact there is no table of ports that can selected from programmatically - I get some of the reasons for this as numbers of ports and port numbers will change.

Many thanks again.

Correct.

It shouldn’t be significant as often these translators will happen in parallel. With that said, if you don’t want further translators done the list to process anything, you can set the ‘Stop Processing’ flag and upon successful outgoing action, the engine will cycle back to the first translator of the first preset.

image

Well, I split them up because the outgoing message has a specific length as well and so if you send a 2 byte message to a 3 byte perform, it will put out an extra stray byte.

Yes, so I assign numbers and that allows me to use integer parameter’s to select a given port (with a different translator).

Again, there might be better ways to do this but for now, that was the best I could come up with. What I think it might need is a way to do many to many routing of both ports and MIDI channels but right now I fried my brain on just your current request.

Steve Caldwell
Bome Customer Care


Also available for paid consulting services: bome@sniz.biz