Binding to Master Volume fader

Hi all
Feeling a bit stupid here but I can’t find a way to bind a Midi Remote fader to master volume. I was able to bind channel volume faders using something like:

        page.makeValueBinding (faderValue, channelBankItem.mValue.mVolume).setTypeDefault()

but I can’t find the master volume in the API.
Any clue ?

Your own the right track but you need to get just the output MixerBanks.
The code below is what I use to switch between Master, Value Under Cursor, Control Main, and Headphones (there’s more code to do the switch of the page)

  // Master Fader
    // If there is only One output it will be Main
    // If there is more than one out then this will be the first one - there doesn't appear to be a way to verify this
    var outputMixerBanks = page.mHostAccess.mMixConsole.makeMixerBankZone().includeOutputChannels()
    var outputMixerBankChannels = outputMixerBanks.makeMixerBankChannel()
    page.makeValueBinding(surfaceElements.faderMaster.fader.mSurfaceValue, outputMixerBankChannels.mValue.mVolume).setValueTakeOverModeJump().setSubPage(subPageMasterFaderMain)
    page.makeValueBinding(surfaceElements.faderMaster.fader.mSurfaceValue, page.mHostAccess.mMouseCursor.mValueUnderMouse).setValueTakeOverModeJump().setSubPage(subPageMasterFaderValue)
    page.makeValueBinding(surfaceElements.faderMaster.fader.mSurfaceValue, page.mHostAccess.mControlRoom.getPhonesChannelByIndex(0).mLevelValue).setValueTakeOverModeJump().setSubPage(subPageMasterFaderHeadphone)
    page.makeValueBinding(surfaceElements.faderMaster.fader.mSurfaceValue, page.mHostAccess.mControlRoom.mMainChannel.mLevelValue).setValueTakeOverModeJump().setSubPage(subPageMasterCMain)
    // Switch Master Fader to Main Out->Headphone->Value Under Cursor (AI)
    // Switch Master Fader to Main Out->Headphone->Value Under Cursor (AI)
    page.makeActionBinding(surfaceElements.faderMaster.mixer_button.mSurfaceValue, MasterFaderSubPageArea.mAction.mNext)

Full code is here:

Now I just wish my selecting of channels would work the first time (and not just every time after the first!).


The includeOutputChannels() means you will have all channels + the output. Of you want to remove all other channel types, use the excludeAidioChannels() and other channel types, please.

Please, add the midi-remote tag.

So I need to define subpages even if I always use the 9th fader of my h/w control surface for master volume control in Cubase ?

No need for the subpage - I just use it to switch between things.

Thanks for your help. It works :slight_smile:

You may be right, but in my code it works with .includeOutputChannels(), and not without it

And I did have the midi-remote tag set on :slight_smile:


Can you see the output channels only in this case?

Yep. Seems to work for me this way.

1 Like

TBH Martin, I don’t understand the use of these methods, and I would be grateful if you could enlighten us… As you can see in one case there is an excludeOutputChannels, and in the other case an includeOutputChannels. All I can say is that it seems to work…
Here is my code:

	var hostMixerBankZone = page.mHostAccess.mMixConsole.makeMixerBankZone()
	page.makeValueBinding (faderValue, channelBankItem.mValue.mVolume).setTypeDefault()
	// Used for master volume fader
	var outputMixerBank = page.mHostAccess.mMixConsole.makeMixerBankZone()
	var outputMixerBankChannels = outputMixerBank.makeMixerBankChannel()
	page.makeValueBinding(surfaceElements.masterFader.mSurfaceValue, outputMixerBankChannels.mValue.mVolume).setTypeDefault()


To me it looks like the makeMixerBankZone() enables all channel types, by default. If you use .includeX(), then just this one channel type becomes included and all others become filtered out. If you use the .excludeX() the one becomes filtered out and all other channel types remain.

OK. But all mixer volumes are output channels, so why the .excludeOutputChannels() then ?
And why do I need the .includeOutputChannels() to have it working for the master fader ?

My guess was that input/output channels were references to physical inputs and outputs in Studio Setup (all of which are connected to faders in the Cubase Mixer - like Main).
Audio, Instrument, MIDI where for channels/tracks in Cubase.

My theory is if you had more than one Output Fader then you would need to figure out which one is Main because you would get a list of them back.

Then includeX() and excludeX() operate as @Martin.Jirsak described.

So far that theory has held up, but I could easily be wrong.


What do you mean by this? Only the “red channels on the right” are the Output Channels (to let’s say Output Busses). You also can include/exclude Input Channels (Busses). You can do this same for following channel types:

  • includeAudioChannels () : this
  • includeInstrumentChannels () : this
  • includeSamplerChannels () : this
  • includeMIDIChannels () : this
  • includeFXChannels () : this
  • includeGroupChannels () : this
  • includeVCAChannels ()

or even like this:

  • includeWindowZoneLeftChannels () : this
  • includeWindowZoneRightChannels () : this

From this the channel types are clear.


Exactly, the very same way as you get an array of Audio Channels.This would return the 1st (most probably the Main) Output:

var outsMixerBankZone = page.mHostAccess.mMixConsole.makeMixerBankZone()
var mainOut = outsMixerBankZone[0]

OK. It is starting to make sense :slight_smile:
Thanks guys.
So in my case where I use the faders only for track (instrument) volumes, I could replace the .excludeOutputChannels() with an .includeInstrumentChannels()
And of course for the master volume fader keep the .includeOutputChannels()
Correct ?

1 Like

:+1: Yep