Script for focused plugin parameters 9-16

Hi, beginner on scripting here!
I found how to call the 1rst parameterbank (QC encoders 1-8)

 var focusQuickControl1 = page.mHostAccess.mFocusedQuickControls.getByIndex(stripIndex)

and I want to extend to a 2nd parameterbank of 8, as encoders 9-16.
How to declare and call these?

Hi, you can’t. Focused quick controls are limited to 8.

What you can do for now, is to have assignments to banks of parameters of the instrument slot, the inserts slots and the strip effects slots.
This means that you have to have separate pages (or subpages) of assignments for these slots, and call them using some buttons. The unfortunate bit here, is that you can’t take advantage of the focus daemon.
There is a workaround for this, but for now I prefer to not extend on this, and leave for another time to present a snippet.

In the mean time, here’s a snippet for the above:

//We need two buttons for navigating to the instrument and inserts slot subpages
var buttonInstrumentSubPage=surface.makeButton(0,0,1,1)
buttonInstrumentSubPage.mSurfaceValue.mMidiBinding
    .setInputPort(midiInput)
    .bindToControlChange(0,20)

var buttonInsertSubPage=surface.makeButton(1,0,1,1)
buttonInsertSubPage.mSurfaceValue.mMidiBinding
.setInputPort(midiInput)
.bindToControlChange(0,21)

//We need another two buttons for navigating to the banks of parameters
var buttonParameterBankPrev=surface.makeButton(2,0,1,1)
buttonParameterBankPrev.mSurfaceValue.mMidiBinding
    .setInputPort(midiInput)
    .bindToControlChange(0,22)

var buttonParameterBankNext=surface.makeButton(3,0,1,1)
buttonParameterBankNext.mSurfaceValue.mMidiBinding
    .setInputPort(midiInput)
    .bindToControlChange(0,23)


var numOfParametersPerBank=8

//build the knobs
var knobs=[]

for(var i=0;i<numOfParametersPerBank;i++){

    var knob=surface.makeKnob(i,1,1,1)
    knob.mSurfaceValue.mMidiBinding
        .setInputPort(midiInput)
        .bindToControlChange(0,24+i)

    knobs.push(knob)

}

var instrumentSlot=page.mHostAccess.mTrackSelection.mMixerChannel.mInstrumentPluginSlot
var instrumentSlotZone=instrumentSlot.mParameterBankZone

var insertsSlot=page.mHostAccess.mTrackSelection.mMixerChannel.mInsertAndStripEffects.makeInsertEffectViewer("insertsViewer")
insertsSlot.followPluginWindowInFocus()
var insertsSlotZone=insertsSlot.mParameterBankZone

var controlsSubPages=page.makeSubPageArea("controlsSubPages")

var subPages=[controlsSubPages.makeSubPage("InstrumentSubPage"),controlsSubPages.makeSubPage("InsertsSubPage")]

for(var i=0;i<numOfParametersPerBank;i++){

    var instrumentParameter=instrumentSlotZone.makeParameterValue()
    page.makeValueBinding(knobs[i].mSurfaceValue,instrumentParameter).setSubPage(subPages[0])

    var insertParameter=insertsSlotZone.makeParameterValue()
    page.makeValueBinding(knobs[i].mSurfaceValue,insertParameter).setSubPage(subPages[1])

}

page.makeActionBinding(buttonInstrumentSubPage.mSurfaceValue,subPages[0].mAction.mActivate).setSubPage(subPages[1])

page.makeActionBinding(buttonInsertSubPage.mSurfaceValue,subPages[1].mAction.mActivate).setSubPage(subPages[0])

page.makeActionBinding(buttonParameterBankPrev.mSurfaceValue,instrumentSlotZone.mAction.mPrevBank).setSubPage(subPages[0])

page.makeActionBinding(buttonParameterBankNext.mSurfaceValue,instrumentSlotZone.mAction.mNextBank).setSubPage(subPages[0])

page.makeActionBinding(buttonParameterBankPrev.mSurfaceValue,insertsSlotZone.mAction.mPrevBank).setSubPage(subPages[1])

page.makeActionBinding(buttonParameterBankNext.mSurfaceValue,insertsSlotZone.mAction.mNextBank).setSubPage(subPages[1])
2 Likes

Thank you for your answer.