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:
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.
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()
.excludeInputChannels()
.excludeOutputChannels()
...
page.makeValueBinding (faderValue, channelBankItem.mValue.mVolume).setTypeDefault()
// Used for master volume fader
var outputMixerBank = page.mHostAccess.mMixConsole.makeMixerBankZone()
.includeOutputChannels()
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:
OK. It is starting to make sense
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 ?