Banked vs. Unbanked Program Changes

Hi All,

For complicated reasons, I’m trying to cut my MIDI setup down to using one 16-channel MIDI ‘pipe’ from the two pipes I currently use. To do this, and still have some non-dedicated channels to control various VSTs, I have to multiplex a few things.

An obvious place is the program control of my Nord Stage and Studiologic SL73. I send a lot of MIDI to the Stage, but never send anything to the SL73 except program changes. What I planned to do was to treat the SL73 as ‘Stage Bank #32,’ and use filters or bindings to map Bank 32 PCs into Bank 0 PCs for the SL32. The problem is, both the Stage and SL73 respond to banked and unbanked PC messages. Regardless of which keyboard is setup first:

  • The first banked PC message sets up the correct program on the first keyboard.
  • The second banked PC message sets up the second program on the second keyboard AND –
  • The first keyboard moves to the second (unbanked) PC message in the last bank it received.

What I need to do is to tell Cantabile, “Filter out any unbanked PC messages on CH16, but let the banked ones through.”

Is there a – hopefully, elegant – way to do this? I can filter (or remap) the undesired CC32/CC0 messages to the two keyboards, but the PC bytes still come through.

Thoughts?

I’m not a great expert in this, but trying to control my Yamaha p525 by midi. I. Would think that you can send system specific messages that specify in the first bytes what equipment it is ment for. Reading the response of the keyboard making the switch you need should give a clue for the message format,
Joop

There isn’t really such a thing as a “banked” or an “unbanked” program change. A “banked” program change is simply a combination of one or two “bank select” commands followed by a program change command. But the actual “program change” command stands on its own; the “bank select” commands simply “prep” the recipient device to interpret the program change correctly (i.e. switch to a program in the correct bank / range).

There may be cases that one bank select command is followed by multiple PCs, which all need to be interpreted as “banked”, since the previous bank select needs to be persistent until the next bank select arrives.

Cantabile can interpret incoming bank selects correctly, so that an incoming PC is interpreted as banked if preceded by a bank select, but I don’t see a way to do what you plan using that method.

Can you elaborate a bit more on your setup and what commands you need to send between your KBs and Cantabile? Maybe there’s a different way to achieve your objective…

Cheers,

Torsten

Thanks for the replies.

@Joop I’m reluctant to use SysEx, because this is a live setup. The MIDI standard treats SysEx as a global message, and requires all devices to pause and look at incoming SysEx before completing other processes. (Used to be a big problem with '80s and early '90s gear!) I rarely send PC messages mid-song, but I can’t say that I never do it. So, there might be delays in processing notes, etc. if the PC is wrapped in SysEx.

@Torsten My issue isn’t really inside Cantabile; it’s in the two USB-MIDI controllers that are attached to the PC. They respond to PC data with or without the CC0/CC32 commands. So, if they are both on the same MIDI channel, sending the second PC will contradict the first one. I was hoping there might be an easy way to say to Cantabile, “When you get a PC on Port X, don’t pass it to Port Y unless there is also a CC0/CC32 message with it.”

I realize that this is outside the MIDI spec per se, but Cantabile can do a lot of MIDI-like things that are outside the MIDI spec. I was hoping someone might have had this need before, and knew of a binding or state setup to handle it. I think I may have to see if I can rationalize the use of some other MIDI channel for PC message to the second keyboard. There are probably 1-2 channels in my new setup that will never actually need a PC message. We’ll see …

Sorry if I’m not getting this, but if you send PCs to both controllers on the same MIDI channel, they will always respond to any PC you send.

So even if you have Cantabile ignore some PCs, anything you do send will be acted on by both MIDI controllers, if they are on the same MIDI channel.

@Torsten Not necessarily. Each master keyboard is on its own USB link, so if I could get Cantabile to route the messages based on bank, it would work:

  • Bank 0-3: only send to Nord Stage
  • Bank 32: only send to SL73, change bank to Bank 0
  • Any other bank #: suppress the entire PC+ Bank message
  • No bank #: suppress the PC message

I was able to do something similar on the MIDI Solutions Router many years ago. I think it’s possible to do this with states, but I’m not sure about the latency for real-time changes –

  • State 1: if (valid_bank_for_Nord) jump to State 2
  • _____: if (valid_bank_for_SL73) jump to State 3
  • State 2: send Bank+PC to Nord; jump to State 1
  • State 3: send Bank 0+PC to SL73; jump to State 1

But the timing (latency) could get tricky if multiple messages are sent at one time.

Anyway, I figured out that CH14, which I use to send the SL73 to the ‘2nd keyboard’ input of the Stage doesn’t ever need PC messages, so that’s a good place to put the SL73 global channel. I can send SL73 programs there, and the Stage ignores them.

This whole exercise has been a challenge, because I really have 20 VSTs and/or other MIDI devices mapped to 16 channels. :face_with_spiral_eyes: But it works!

OK, it wasn’t clear to me from your initial description that the two destinations are still on separate MIDI outputs (you wrote ‘one 16-channel MIDI pipe’). In that case, it is feasible, of course. I was immediately thinking of a utility rack, similar to your described approach:

I agree, I’d be worried about state switching between MIDI commands. But the same logic could easily be implemented in ReaJS, with the “state” implemented in an internal variable, so that the routing of MIDI commands could be quasi-instant.

I’d suggest building a script that scans your incoming MIDI data, switches an internal “state” variable according to incoming Bank Select commands, and then modifies your PC data. Since ReaJS scripts generally work with one output port, I’d just modify the MIDI channel depending on destination and then let Cantabile work out the routing after the script.

Do you have any experience with ReaJS? The language needs a bit of getting used to, but there’s a lot of funky stuff you can do with it in the MIDI space, so if you haven’t tried it, it would be a good addition to your toolset, given the apparent complexity of your setups

Cheers,

Torsten

2 Likes

I’ll have to look into ReaJS. The oddities of the language don’t bother me: I’m turning 70 this year, and took my first programming course at school (BASIC and FORTRAN) when I was 13. It can’t be any more cryptic than Assembly or PL/1, or MidiOx for that matter!

Does it require Reaper? That might be a deal-breaker for me.

It’s part of a free VST offering called ReaPlugs

3 Likes