Any automated way to reset MIDI volume

Hi There,
Is there any way (macro, logical editor, midiremote api,…) to reset the selected MIDI track MIDI volume to default ?
I know that we can use Cmd-click (on Macs) on a track to set the Midi volume to default value, and then type “-1” in the volume area to set the MIDI fader back to “Off”, but what I want is just push a button on my control surface (currently a Keylab MK2). Any idea ?

Hi, not sure what you mean with the “default”. Do you mean volume 100 or volume off?

In either case, you can create a midi remote surface using the mapping assistant, and use the Keylab MK2 port (NOT the DAW one) for input/output. Then you can assign a button to the volume, with some extra steps necessary.

Say you have button 1 assigned to CC22 at Channel 1.

Our remote surface should look like this:

Note that I have set both min and max value of the control to 127.

Now, after creating this single control we can go to the mapping assistant and select as parameter the volume of the selected track (it doesn’t really distinguish between midi or others):

Then on the left side of the assistant, instead of leaving min/max to 0 and 100%, we have to alter this based on what we want.

If we want our (midi) track to default to 100, we have to set both min/max to 79% and set the value mode to “Jump”. If we want it to reset to Off, we set min/max to 0%:


However, why not simply having the knob for volume and just turn it down? Anyway, probably you have reasons for this.

Thanks for your answer Minas.

What confuses me is precisely that you CAN’T use the fader because when you slide it down to 0 the last value seen by the DAW is 0 so it is set to OFF but with the MIDI volume set to 0.

Well, I know that. But that’s not what I want. Sorry , my bad, I was not precise enough. I want to do this in a midi remote script (actually one of yours), which is why I gave as example macros, PLE, midiremote API.

Out of curiosity to which page/button would you want to do this assignment? By the way, it’s still not clear to me: You want the OFF value or the default 100?

Ok. Here is the use case. Your script for the Keylab MK2 is wonderful and very powerful but too complex for several of my musician friends. In fact they feel they would have to spend more time learning which buttons to push or faders to move than just using the shortcuts they know with the PC keyboard and the mouse. So the plan is to label the Keylab switchboard with functions organized in a more or less intuitive manner. They prefer to have access to less functions… I don’t try to contradict them, they are artists and difficult to convince ha ha.

So the idea is to use DAW mode to handle the most used Cubase functions, and USER mode to handle the instrument plugin parameters. I have modified your script to handle the following functions so far (it is likely to change, we are testing the usability so far):

- Faders: track volumes

- Knobs: track pans

- Track selection:

Next/Previous Buttons (+ no bank)

Next/Previous Buttons (+ bank = x8)

- Selection Range


- Windows

Main page (workspace 1): Cmd+Rewind

Show/Hide Plug-in: Cmd+FForward

Select all containers in track and edit in lower zone: Cmd+Stop

Select all containers in trackand edit full page: Cmd+Play

Instrument (Edit VST Instrument): Cmd+Rec (saved size)

Maximize current window (if available): Cmd+Loop

- Different zooms

Horizontal: Shift+Jog

Vertical: Ctrl+Jog

- Tempo


- Copy


- Cut


- Paste


- Duplicate


- Locators based on selection


- Undo/Redo

Dedicated Button (Shift = redo)

- Position cursor to beginning


- Position cursor to end


- Fast Rewind (setup Preferences):


- Fast Forward (setup Preferences):


- Position cursor to beginning of selection


- Position cursor to end of selection


- Position cursor to previous marker


- Position cursor to next marker


- Play from selection start


- Follow cursor (Auto-scroll)


- Macros (Pads 5/6/7, see attached picture)

Macros 1:

- B1: Toggle Return to Start activation (Option-D)

- B2: Down by 1 half-tone

- B3: Up by 1 half-tone

- B4: Down by 1 octave

- B5: Up by 1 octave

- B6: Set selected tracks to Linear (clock icon))

- B7: Set selected tracks to Musical (note icon)

- B8: Humanize velocities+timing

Macros 2:

- B1: Humanize velocities only

- B2: Humanize timing only

- B3:

- B4:

- B5:

- B6:

- B7:

- B8:

Macros 3:

- B1:

- B2:

- B3:

- B4:

- B5:

- B6:

- B7:

- B8:

So back to the initial question, it happened several times that they moved faders of MIDI tracks by mistake, and I explained how to fix that but it is to cumbersome and not good for their workflow (they want to focus on creativity, not technique). Ideally, one of the select button could be used to reset all MIDI faders to OFF on Cubase mixer with the MIDI volume set back to the default value (usually 100, as you said). Right now I am using these buttons to trigger macros, as the process is fairly straightforward ("push the Macros 1 button which will be lit up, and then use the labels below the buttons to know which button to push for the macro you want).

I didn’t want to bother you with all these details because I know you are quite busy, but since you asked…

Was it less complex when they had to remember an Alt+Ctrl+Shift+Something does something?

Anyway, I do know that some musicians will find all these options absurd, wishing you the best with dealing with the situation :slight_smile:

Your options are not absurd, Minas, just overwhelming for some people… :wink:

Anyway, I was thinking of merely filtering out (i.e. not binding) the fader actions for midi tracks. For instance if my first 4 tracks are of MIDI type I would do:

function bindChannelBankItem(index) {
        var channelBankItem = mixerBankZoneChannels[index]
        var faderValue = surfaceElements.faderStrips[index].fader.mSurfaceValue
        if (index>3) {        
           page.makeValueBinding(faderValue, channelBankItem.mValue.mVolume).setValueTakeOverModePickup().mOnValueChange=(function(activeDevice,activeMapping,value){

But this obviously is very limiting. I can’t find a way to detect the track type, and replace if(index<3) with something like if (track.Type == 'MIDI')

Any hint ?

If you really don’t want midi tracks to be controlled by the faders, you can alter a bit the mixer bank zone settings. However, this way you will not be able to even select a midi track using the select buttons, solo/mute etc.

Anyway, if you want to try this approach, search for these lines

var hostMixerBankZone = page.mHostAccess.mMixConsole.makeMixerBankZone("Tracks")



Another approach would be to have completely different bank zones, for audio and midi tracks, however this would need effort (a lot the way I see it) to readjust many parts of the script.

It is doable but a bit complicated:
When a page loads, the API sends a bunch of mOnDisplayValueChange messages for our tracks’ volume. Now, when we have audio/instrument tracks, we get a number with two decimal places, and when we have midi, we get an integer (no decimals). This way we can know if it’s a midi track.
Then, we have to instead of directly binding the physical fader to the volume, to set it to a custom variable which will alter a pseudo fader attached to the volume, ONLY when we have not a midi track, by inspecting a flag in its mOnProcessValueChange event.

I saw comments (NOT in this forum) with pretty heavy criticism on my scripts. Some users obviously miss that these scripts were designed based on my own workflow (and it’s a pretty demanding one) and secondly that having an option being there doesn’t oblige anyone to use it. Anyway, this negativity, turned my willing for sharing a bit down.

Don’t let a few imbeciles slow you down. The community needs people like you willing to share the immense work they’ve been doing. We can’t thank you enough for sharing this, and also answering people’s comments and questions.
It takes a lot of efforts to develop scripts, given that the documentation is very poor for non-savvy people. So THANK YOU !!! Keep it up !

1 Like

This point has not been answered really: what is deemed to be the default value for MIDI volume? The value that Cubase sends when Ctrl-clicking on the volume fader? Because that is just Steinberg’s idea of a default value. In the world of MIDI there is no default value for volume.

So, I think it would be important that you tell us a number from 0 to 127.
Personally I would think it is 127. Is that what you want to achieve, too?

Actually I did answer:
" Ideally, one of the select button could be used to reset all MIDI faders to OFF on Cubase mixer with the MIDI volume set back to the default value (usually 100, as you said)."

All my external gear is by default set to volume=127. You want it to be 100, okay.

You do understand that the volume fader for MIDI channels in Cubase does not necessarily SHOW the current volume setting but that it is merely a tool to manipulate the setting? Audio channel volume faders show the current value, MIDI volume faders do it only by coincidence.
The “Off” value is just a way to show that this particular fader has not sent any information yet. Otherwise the fader displays the last information it sent to the receipient. Which could already be altered somewhere else without the fader showing it.

Yes I know how midi faders work in Cubase. :slightly_smiling_face:
My assumption was that most synths started with a MIDI Volume set to 100 by default. This is also what Steinberg developers assumed since their Cmd-click set the MIDI faders to 100. This used to be the case last time I checked (long time ago). Probably not anymore…
So after thinking more about what I am trying to solve (accidental moving of MIDI faders), I am more inclined to prevent MIDI faders to be used, using the MIDI remote API. @m.c gave some good tips on how to achieve that.

If you want to edit my script, here’s a workaround:
Find the line


Right after that, add:

var midiDefault=0.79
            var midiDefault127=100

            if(arg3.indexOf(".")==-1 && arg3.indexOf("-")==-1){
                var v127=parseInt(arg3)

This will restore the midi track volume to whichever default you define. Note that you have to set the midiDefault to your midiDefault127/127, rounded to two digits should be enough. I don’t do the calculation there to avoid just another delay.

Thanks Minas, that works.
But as said before, I prefer the option of not binding the faders in case of MIDI channel.
I managed to create an isMidiTrack array where the isMidiTrack[index] are set to the correct boolean values, thanks to your idea using the volume value format. But from there I am not sure where to use the information in the code…

There’s no such place at the moment. You have to create custom variables assigned to volume instead of the faderStrips I have, and in the mOnProcessValueChange of the faderStrips, check for the isMidi and if is false, pass the value of the faderStrips to the custom variable… But even then, you will probably lose the pickUp functionality of our faders.

1 Like