Sorry, now I understand the issue. It usually doesn’t take me this long There are quite a few ways to deal with this. What I’ve done below is to interpolate between the different filters depending on the value of the button. Works fine. No more clicks.
<Cabbage>
form caption("P") size(470, 400), colour(205, 225, 220), pluginid("P0001")
rslider bounds(30, 128, 100, 100), channel("lowpass"), range(1200, 16000, 2000, 1, 1), text("lowpass"), trackercolour(0,0,0), outlinecolour(0, 0, 0, 50), textcolour("black") ;lowpass
rslider bounds(130, 128, 100, 100), channel("res"), range(0.1, 0.8, 0.6, 1, 0.01), text("res"), trackercolour(0,0,0), outlinecolour(0, 0, 0, 50), textcolour("black")
rslider bounds(230, 128, 100, 100), channel("lfo2"), range(0.1, 25.0, 20.0, 1, 0.01), text("lfo2 freq"), trackercolour(0,0,0), outlinecolour(0, 0, 0, 50), textcolour("black") ;lpf lfo
rslider bounds(330, 128, 100, 100), channel("lfo2int"), range(120, 1000, 520, 1, 1), text("lfo2 intensity"), trackercolour(0,0,0), outlinecolour(0, 0, 0, 50), textcolour("black") ;lpf lfo inte
checkbox bounds(432, 212, 15, 15), channel("lfo2b"), colour:0("white"), colour:1("black")
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d
;-n -d -+rtmidi=NULL -M0 -m0d
</CsOptions>
<CsInstruments>
; Initialize the global variables.
ksmps = 32
nchnls = 2
0dbfs = 1
instr 1
klfo2 chnget "lfo2"
klfo2B chnget "lfo2b"
klfo2Int chnget "lfo2int"
klfof lfo klfo2Int, klfo2, 0
kSmooth tonek klfo2B, 10
kcf chnget "lowpass"
kres chnget "res"
a1 inch 1
a2 inch 2
af1 moogladder a1, kcf+klfof, kres
af2 moogladder a2, kcf+klfof, kres
af3 moogladder a1, kcf, kres
af4 moogladder a2, kcf, kres
aLeft ntrpol af1, af3, kSmooth
aRight ntrpol af2, af3, kSmooth
outs aLeft, aRight
endin
</CsInstruments>
<CsScore>
;causes Csound to run for about 7000 years...
f0 z
;starts instrument 1 and runs it for a week
i1 0 [60*60*24*7]
</CsScore>
</CsoundSynthesizer>