@rorywalsh Well here a multi page (with plants) I made, starting from the toogle example, but with three buttons that call three plants. The buttons code is in the “Instr 1” section, but in that way also the plants are triggered by the keyboard widget Where am I failing?
` bounds(0, 0, 0, 0)
form caption(“MultiPage”) size(800, 600), colour(86, 76, 56), pluginid(“def1”)
button bounds(500, 2, 60, 25), channel(“but1”), text(“Osc”, “Osc”), value(1)
button bounds(570, 2, 60, 25), channel(“but2”), text(“Fx”, “Fx”), value(0)
button bounds(640, 2, 60, 25), channel(“but3”), text(“Arp”, “Arp”), value(0)
groupbox bounds(0, 40, 800, 560), text(“White Sliders”), visible(0), identchannel(“sliders1”), plant(“GUIabst_1”){
image bounds(0, 0, 800, 560) file(“atke.png”)
rslider bounds( 0, 100, 80, 80), valuetextbox(1), textbox(1), text(“Att.”), channel(“AAtt”), range(0, 5, 0.05), $SLIDER_STYLE
rslider bounds( 60, 100, 80, 80), valuetextbox(1), textbox(1), text(“Dec.”), channel(“ADec”), range(0, 5, 0.5), $SLIDER_STYLE
rslider bounds(120, 100, 80, 80), valuetextbox(1), textbox(1), text(“Sus.”), channel(“ASus”), range(0, 1, 1), $SLIDER_STYLE
rslider bounds(180, 100, 80, 80), valuetextbox(1), textbox(1), text(“Rel.”), channel(“ARel”), range(0, 5, 0.2), $SLIDER_STYLE
;hslider bounds(0, 30, 200, 30), channel(“hslider1”), range(0, 100, 55), colour(“white”)
;hslider bounds(0, 60, 200, 30), channel(“hslider2”), range(0, 100, 23), colour(“white”)
;hslider bounds(0, 90, 200, 30), channel(“hslider3”), range(0, 100, 45), colour(“white”)
;hslider bounds(0, 120, 200, 30), channel(“hslider4”), range(0, 100, 56), colour(“white”)
}
groupbox bounds(0, 40, 800, 560), text(“Red Sliders”), visible(0), identchannel(“sliders2”), plant(“GUIabst_2”){
image bounds(0, 0, 800, 560) file(“bente.png”)
hslider bounds(0, 30, 200, 30), channel(“hslider5”), range(0, 100, 25), colour(“red”)
hslider bounds(0, 60, 200, 30), channel(“hslider6”), range(0, 100, 63), colour(“red”)
hslider bounds(0, 90, 200, 30), channel(“hslider7”), range(0, 100, 15), colour(“red”)
hslider bounds(0, 120, 200, 30), channel(“hslider8”), range(0, 100, 16), colour(“red”)
}
groupbox bounds(0, 40, 800, 560), text(“Yellow Sliders”), visible(0), identchannel(“sliders3”), plant(“GUIabst_3”){
image bounds(0, 0, 800, 560) file(“dutdu.png”)
hslider bounds(0, 30, 200, 30), channel(“hslider9”), range(0, 100, 5, 1, 0.001), colour(255, 255, 0, 255) value(5)
hslider bounds(0, 60, 200, 30), channel(“hslider10”), range(0, 100, 63, 1, 0.001), colour(255, 255, 0, 255) value(63)
hslider bounds(0, 90, 200, 30), channel(“hslider11”), range(0, 100, 25, 1, 0.001), colour(255, 255, 0, 255) value(25)
hslider bounds(0, 120, 200, 30), channel(“hslider12”), range(0, 100, 96, 1, 0.001), colour(255, 255, 0, 255) value(96)
}
;instrument will be triggered by keyboard widget
instr 1
kEnv madsr .1, .2, .6, .4
aOut vco2 p5, p4
outs aOutkEnv, aOutkEnv
gkAAtt chnget “AAtt”
gkADec chnget “ADec”
gkASus chnget “ASus”
gkARel chnget “ARel”
gkbut1 chnget “but1”
gkbut2 chnget “but2”
gkbut3 chnget “but3”
if changed(gkbut1) == 1 then
;if gkbut1==1 then
chnset "visible(1)", "sliders1"
chnset "visible(0)", "sliders2"
chnset "visible(0)", "sliders3"
endif
if changed(gkbut2) == 1 then
;if gkbut2==1 then
chnset "visible(1)", "sliders2"
chnset "visible(0)", "sliders1"
chnset "visible(0)", "sliders3"
endif
if changed(gkbut3) == 1 then
;if gkbut3==1 then
chnset "visible(1)", "sliders3"
chnset "visible(0)", "sliders1"
chnset "visible(0)", "sliders2"
endif
endin
;causes Csound to run for about 7000 years... f0 zf1 0 2048 10 1
i1 0 1000