this might be more helpful: here is the lua format. i have a feeling
something may be needed to reset the ‘banksel’ selector (“Partial1_PCM Part1”),
so that it chooses one or other parameter after the panel has loaded.
(i think i need better understanding of what after/before panel ‘has loaded’
means, in terms of state of all parameters, loading off start-up values, etc.)
question: do i need to set a nil value to ‘banksel’, to initialize it?
here is the lua (toggles between 2 views):
—
— Called when a modulator value changes
— @mod http://ctrlr.org/api/class_ctrlr_modulator.html
— @value new numeric value of the modulator
—
PCM1Bank_showChoice_Pt1 = function(mod, value)
bankSel = panel:getModulatorByName(“Partial1_PCM Part1”):getValue()
pcm1 = panel:getModulatorByName(“PCM1_P1 Part1”)
pcm2 = panel:getModulatorByName(“PCM2_P1 Part1”)
if
bankSel == 0 then
pcm1:getComponent():setVisible(true)
pcm2:getComponent():setVisible(false)
elseif
bankSel == 1 then
pcm1:getComponent():setVisible(true)
pcm2:getComponent():setVisible(false)
elseif
bankSel == 2 then
pcm1:getComponent():setVisible(false)
pcm2:getComponent():setVisible(true)
elseif
bankSel == 3 then
pcm1:getComponent():setVisible(false)
pcm2:getComponent():setVisible(true)
end
end