Certainly, and thank you for the help…
// get the api's entry point
var midiremote_api = require('midiremote_api_v1')
// create the device driver main object
var deviceDriver = midiremote_api.makeDeviceDriver('JasonMade', 'MyMIDIController', 'Jason')
// create objects representing the hardware's MIDI ports
var midiInput = deviceDriver.mPorts.makeMidiInput()
var midiOutput = deviceDriver.mPorts.makeMidiOutput()
// define all possible namings the devices MIDI ports could have
// NOTE: Windows and MacOS handle port naming differently
deviceDriver.makeDetectionUnit().detectPortPair(midiInput, midiOutput)
.expectInputNameEquals('MyMIDIControl')
.expectOutputNameEquals('MyMIDIControl')
// create the joystick
var joystickXY = deviceDriver.mSurface.makeJoyStickXY(16, 8, 7, 7)
joystickXY.mX.mMidiBinding.setInputPort(midiInput).bindToControlChange(0,21)
joystickXY.mY.mMidiBinding.setInputPort(midiInput).bindToControlChange(0,22)
var joyButton = deviceDriver.mSurface.makeButton(16, 16, 7, 3);
joyButton.mSurfaceValue.mMidiBinding.setInputPort(midiInput).bindToControlChange(0,23)
// create the default mapping page
var mainPage = deviceDriver.mMapping.makePage('Default')
// create joystick subpages
var subPageJoystick = mainPage.makeSubPageArea('subPageJoystick')
var subPageQCs = subPageJoystick.makeSubPage('Quick Controls')
var subPageCCs = subPageJoystick.makeSubPage('CC 21 & CC 22')
// bind joystick button to switch between subpages
mainPage.makeActionBinding(joyButton.mSurfaceValue, subPageCCs.mAction.mActivate)
.setSubPage(subPageQCs)
mainPage.makeActionBinding(joyButton.mSurfaceValue, subPageQCs.mAction.mActivate)
.setSubPage(subPageCCs)
// in the QC subpage, bind the joystick to the Quick Controls 7 & 8.
mainPage.makeValueBinding(joystickXY.mX, mainPage.mHostAccess.mFocusedQuickControls.getByIndex(6)).setSubPage(subPageQCs)
mainPage.makeValueBinding(joystickXY.mY, mainPage.mHostAccess.mFocusedQuickControls.getByIndex(7)).setSubPage(subPageQCs)
// in the CC subpage, leave them "unbound" so they can just pass through...
This is what I have so far… and it works for controlling Quick Controls 7 & 8 (on both “subpages” because I haven’t yet written any binding for the “CC#21 and CC#22” subpage yet). I don’t really know how to do it but what I want is that when I switch to the other subPageCC, I want the midi data to just pass through to the instrument.
So, if I have an older VST instrument that just needs to “learn” CC#21 and/or CC#22 to control additional parameters, I can just click the joystick button and, instead of the joystick controlling Quick Controls 7 & 8, it is now just “unassigned” midi data that gets passed through to the selected instrument. So, maybe I just want to leave the Quick Controls alone and control those with my LaunchKey (with eight encoders already, and perfectly suited for controlling eight quick controls) and then just use the joystick to “pass through” to control two ADDITIONAL parameters in an instrument (like the Sphere in HALion or an XY PAD in one of the Kontakt instruments).
I also understand that I can just leave the joystick unbound all the time but, since it has a button, I thought it would be nice to have two modes. One to control some quick controls and another to simply pass cc data through to an instrument.
Thanks again for your help.
JL