Bank select - two CC's at once?

Hi all,

I’m trying to do a ‘bank select’ on my Roland Fantom. The MIDI spec says this:

I take that to mean I need to send two CC’s in serial - CC0 followed by CC32.

eg.
B0, 00, 00 ← MIDI channel 1, CC0, bank MSB = 0
B0, 20, 01 ← MIDI channel 1, CC32, bank LSB = 1

Does that seem about right? I’m not familiar with interpreting MIDI implementation charts.

If that’s correct, can I get the Electra One to do that from the editor (ie. without resorting to LUA, mods, etc)?

Many thanks,
Ben

ps. If I need to resort to LUA or something else along those lines, any pointers where to start please?

I used the Electra One Console to monitor MIDI messages when switching bank on the Fantom. This is what it showed:

image

So it looks like I read the MIDI spec correctly, but the two CC’s are actually followed by a Program Change message as well.

Ideally, I’d like to incorporate the program change too. Any pointers would be much appreciated.

I found this LUA example after digging around the docs:
electra.one/03_send_multiple_messages.lua at master · martinpavlas/electra.one · GitHub

Looks like that’ll do it, but I’m still wondering if it can be done directly in the editor (I suspect not)?

Hi Ben,
indeed a bank change doesn’t work on its own, it always has to be followed by a program change to become active.

In some case both bank changes (CC0 for MSB and CC32 for LSB) are required , but not always.

In short: if you want to perform a program change within the current bank, transmtting the Program Change only is sufficient.
But the moment you want to change the bank as well, you must send the Bank Changes and the Program Change immediately afterwards.

Here is a code example on how you could do it.

  • This is for a synth where I use only CC32 for changing banks and CC0 is fixed on 0, but the synth needs to get both to function properly.
  • The variables devport, channel, bankNum and ProgNum are set elsewhere and speak for themselves.
  • The function selectProgram is called via a momentary on/off button, that’s why I do not need it to do anything on value = 0 or it would transmit everything twice:

function selectProgram(ValueObject, value)
if value==0 then return end
midi.sendControlChange(devport , channel , 32, bankNum)
midi.sendControlChange(devport , channel , 0, 0)
midi.sendProgramChange (devport , channel , progNum)
end

2 Likes

@NewIgnis This is exactly the confirmation I needed! Thank you so much. I look forward to trying it tomorrow, and will report back here in case it’s of use to anyone else in future. Excited to think of all the possibilities of controlling my gear with the E1!

2 Likes

For future reference, it’s working very nicely.

Here’s what I did in the web preset editor:

  • Dragged a Program fader control onto the page and selected it.
  • Set FUNCTION to the name of my LUA function (rolandFantomBankAChangePreset).
  • Changed the control type to VIRTUAL, with a parameter number of 0 (I don’t think it matters in this example), and a MIDI min-max range of 0-127.
  • Closed the control editor.
  • Clicked on EDIT LUA SCRIPT button and pasted my LUA script in.
  • Clicked the CLOSE button.
  • Clicked the SEND TO ELECTRA button.

Here’s my LUA function:

function rolandFantomBankAChangePreset (valueObject, value)
    midi.sendControlChange (PORT_1, 1, 0, 87)
    midi.sendControlChange (PORT_1, 1, 32, 92)
    midi.sendProgramChange (PORT_1, 1, value)
end

The two control changes are ‘Bank Select’ on my Fantom (Bank A), and the final program change uses the current fader value to specify the program/preset number. Note that this example uses a fader and not a momentary pad as shown in the example a couple of posts above (hence the lack of the “if value==0...” line which doesn’t apply to a fader).

Thanks again to @NewIgnis for his assistance above.

Just curious : you are using a fixed bank number right now. I have an old Fantom X and that one has about 20 different MSB and LSB bank combinations. I guess your Fantom will have similar characteristics?

Yes, there are around 10 or so banks of interest in the Fantom, each with their own MSB/LSB combinations.

Not sure if this particular setup is of any actual, real-world use yet, but then I only started experimenting with the E1 yesterday! If nothing else, it was a useful first experiment with preset editing, LUA scripting, and custom MIDI messages for me. I’ll use it as a starting point for future experiments.