Switching images with slider

What OS are you on? it could be that the images are not found. You’ll need to include them in the bundle. Put them into the same folder as the actual plugin binary. Btw, using several images is Ok if you don’t have loads of images. But if you do, it’s easier to just update the file that a single image is showing. Something like this:

<Cabbage>
form caption("Untitled") size(400, 300), colour(58, 110, 182), pluginID("def1")
image bounds(12, 12, 80, 80),file("knob.png"),identchannel("imageIdent1"),visible(1)
</Cabbage>
<CsoundSynthesizer>
<CsOptions>
-n -d -+rtmidi=NULL -M0 -m0d 
</CsOptions>
<CsInstruments>
; Initialize the global variables. 
sr = 44100
ksmps = 32
nchnls = 2
0dbfs = 1


instr 1
;a1 inch 1
;a2 inch 2
a1 random 0, 1

k1 downsamp a1
chnset k1, "gain"

if metro(10) == 1 then
	SMessage sprintfk "file(\"knob%d.png\")", int(k1*30)
	chnset SMessage, "imageIdent1"
endif

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> 

I use a metro to trigger the updating of the images. Otherwise it will update many thousands times a second. Right now it updates 10 times a second which seems reasonable and pretty smooth.