API Midi Remote and Bank Switching Questions

Hello Midi-Remote Lovers,

Today i have a question regarding Bank Switching in Cubase. Many things (if not all) are managed by Cubase automatically if a Bank Switching occurs.

Now to my problem: My C4 controller has four displays and in my case i need to take care of cleaning the displays EACH time i do a bank switching. If i dont do that, then i would see left over values printed on displays, for channels that otherwise would be empty.

Example: You have a nine channel project and wants to bank switch to last bank, then this last bank would still show the values of the start bank on the displays. They are not cleaned by Cubase.

So a code is needed, that cleans the displays, so that our example would only show values for channel nine and channels 2-8 would be clean / empty fields on the displays (like it should be). This has the downside, that i need to trigger the code EACH time a bank switching occurs, only to have a proper working way to clean channels on last bank.
This is a reduntant and performance stealing action.

To make the code good and efficient, i would need to know, how many empty channels are inside the last bank. The code also needs to know, when we switch to the last bank.

So is there a way, to know and predict the number of empty channels inside the last bank with the API of Midi Remote?
If there is no way to retrive the contents of the last bank, then i would consider it a bug.
Either Cubase does this automatically or we need tools to know this case.

We cant develop efficient scripts, if it is done like it is currently. Since cleaning is unefficient, because we need to send out eight useless sysex messages to clean the displays and all of this with a single midi din cable.


On my side, it works as expected. For example, if I show the Pan on display 3 and Volume on display 4, I can see:

   L2|     R3|     |     |     |     |     |     |
0.00 | -12.5 |     |     |     |     |     |     |

…if I switch to the 2nd bank, where are only 2 channels available.

The displays are cleared, but the LEDs are not. This is because mOnProcessValueChange does not get called for the “empty” columns, whereas mOnDisplayValueChange gets called for all the columns. I have seen this behavior on your script as well as mine.




Good hint, thank you, Ron.


You are right, @Ron.Garrison. Here is the solution:

  • Make a dummy variable.
  • Bind the dummy variable to the BankNext
  • When the Bank > mSurfaceValue changes, do a function to reset all V-Pots and process the dummyBank.
var dummyValueMixerBankZoneNextBank = surface.makeCustomValueVariable('dummyValueMixerBankZonePrevBank')
page.makeActionBinding(dummyValueMixerBankZoneNextBank, hostMixerBankZone.mAction.mNextBank)
surfaceElements.parameterButtons[1].button.mSurfaceValue.mOnProcessValueChange = function (context, value) {
	if (value == 0) return // Avoid double-triggering when you release the Parameter Bank button
	for(var i = 32; i < 65; ++i) {
		midiOutput.sendMidi(context, [0xb0, i, 0]) // Reset V-Pot Rings
	dummyValueMixerBankZoneNextBank.setProcessValue(context, 1)
1 Like

Yep. I already do this. @u-man was hoping we could find a way to clear them only if we were at the end of the bank as opposed to every time we bank next.


I’m afraid Cubase doesn’t return this information.