Cubase 12 Midi Remote with Mackie C4

With the new Midi Remote Editor in Cubase 12, I am able to use the encoders from a Mackie C4. However to get the LED rings working, I need to write a JavaScript. As I am not confident with this kind of language, I hope that someone else here in the forum can help me out.

To make it easier, I first want only one encoder to work properly. The attached picture shows the first encoder of the first row of the 32 encoders.


The black CC is the transmitting CC. This one is already working if I use Midi Remote Editor and use the relative byte signed option.

The red CC is the receiving CC and responsible for the LED rings. This one is not working. My question would be, is it possible to translate what Cubase sends, to something that makes the LED ring working?

Since some people did successfully run the encoders from a BCR 2000, I assume this might be possible for the Mackie C4 encoders too.


In general, you can do something like this…

function onActivatePage(context) {
	function sendFeedbackOut(theSurfaceController, ccNr) {
		theSurfaceController.mSurfaceValue.mOnProcessValueChange = function (context, newValue) {
			midiOutput.sendMidi(context, [0xb0, ccNr, Math.round(newValue * 127)]) // 0xb0 means the MIDI Controller MIDI Message in the Hex format

	sendFeedbackOut(surfaceElements.theSurfaceController, 32)


yourPage.mOnActivate = function (context) {

Does it help?

1 Like

First, thank you. Sadly I can not try this before Wednesday, as I am not at home.
I assume that Cubase sends absolute values back. The LED ring expects a incoming Midi message in form of:
B0 20 xx (xx = 01 to 0b = eleven LED segments)
So the absolute value needs to be divided by eleven to get a proper xx value.


No, Cubase sends so called normalised value in range 0-1. Therefore there is the

Math.round(newValue * 127)

Which changes the range from 0-1 to 0-127.

1 Like

Ok nice, if I understand that correctly, the formula would be:
Math.round(newValue * 11)
since I need something with a range from 1-11.
how do I use this formula for the final output?
B0 20 Math.round(newValue * 11) ???



It’s an array, so it will be:

[0xb0, ccNr, Math.round(newValue * 11)]
1 Like

And if you do this:

[0xb0, ccNr, Math.floor(newValue * 11.99)]

The value steps distribute equally.


Today, i tried to embedd your script, but i simply have no clue where to put it in. Therefore i uploaded a simple script created with Midi Remote Editor, where only one button is used, focusing on QuickControls 1.
I thank you in advance and apologize that i cant do this on my own. (4.8 KB)


Try to paste the attached folders and the *.js file to the MIDI Remote/Driver Script/Local/, so the final path of the script is: MIDI Remote/Driver Script/Local/mj/c4-emulation/mj_c4-emulation.js

At line 12, change the ‘Max 1’ string to the MIDI Input Port name.
At line 13, change the ‘Max 1’ string to the MIDI Output Port name.

Reload the script in Cubase and select Mixer page in the mj - C4-emulation page.

Have fun!

Btw, the script is just adapted from the Steinberg’s nanoKontrol 2 script. (1.7 KB)

Hi Martin,
this LED rings are working, but not properly. I think this is due to the knob settings in the script. The knob does not send the right values for a relative encoder.
The knob setting from my script:
“id”: 15,
“type”: “MidiBindingToControlChange”,
“members”: {
“ChannelNumber”: 0,
“ControlChangeNumber”: 0,
“Type”: “RelativeSignedBit”
It is important that the knob behaves the same in your script (to send in RelativeSignedBit)
More importantly, nothing works if i turn the faders with the mouse in Cubase. No feedback, no response.


Could you send me the code snipped, where did you set the MIDI Port names, please?

I will fix the type of the encoder tomorrow (it’s already late here in my time zone). But you are right, I have to set them other way as they are endless encoders.

Could you verify, correct MIDI data are sent out from Cubase, once you move the fader in Cubase, please?

Hi again :slight_smile: ,
the snipped code is from my script i posted before. I changed Midi Port names to my own Midi Port names that are used in Line 12 & 13 of your according script. I do not think, that something is wrong with that, because the encoders are working, just not properly and that is the reason why the LED rings and encoders are “jumping”.

How do i verify, if correct MIDI data is sent out from Cubase, once i move the fader in Cubase?


Please, do it the other way around. In my script use the name of the real C4 hardware MIDI Port names at lines 12 and 13, please.

Are you on Mac or Windows? Use any virtual MIDI Monitor and send the MIDI data out to the MIDI Monitor, to verify the data, please.


Please, find script update attached. (1.7 KB)

1 Like

Congratulations, everything is working properly now :slight_smile: .
We can move to the next step. The displays. What is possible with sysex and the API?
The best thing would be, if we can change headers of a sysex message. This is something that you can not do easily in Bome MTP.
The header would be only this part of the sysex:
F0 00 00 66 14 … this is the header for the MCU
F0 00 00 66 17 … and this is what we need.
The question is, if we can change the fifth column to “17”. In Bome this is not possible and i needed a variable for every possible case. This are 55 variables per display, 220 for all four displays, just to cover all possible situations.
I hope that we do not need this, with the API.