Cabbage Logo
Back to Cabbage Site

Retrieving sample in soundfiler with presets

Hello all,

You will find attached the simplest synth based on wavshape (see adventure kid for free single cycle wavshapes) which is able to save and restore its configuration.
It only aims at explaining how to retrieve a preset into a soundfiler… and to make some noise. (for sure it could be better coded)

Hope this helps

SimpleSynthPreset.csd (3.5 KB)

1 Like

Thanks for posting. It seems like a good solution. Btw, are you aware that the changed opcode can take any number of input arguments? So I think you could save yourself some code by simply doing this?

gSfilepathA0	chnget	"filenameA0"
gkCombochanged 	chnget "PresetCombobox"
kTrg	changed	gSfilepathA0, gkCombochanged
if kTrg == 1 then			; if this trigger is 1 ...
  event	"i",101,0,0				    ; call instrument to update sample storage function table 

Yes, indeed you are right !