Cabbage Logo
Back to Cabbage Site

Using knobs with adsr

So im pretty new to Csound. If i write the line

 kEnv madsr chnget:k("ampattack"), chnget:k("ampdecay"), chnget:k("ampsustain"), chnget:k("amprelease")

it tells me ‘syntax error.’ is there a specific way i need to seperate opcodes? because it worked fine for the filter. Any help?

heres my code

madsr takes i-rate parameters. Use

kEnv madsr chnget:i("ampattack"), chnget:i("ampdecay"), chnget:i("ampsustain"), chnget:i("amprelease")


Thanks! that got the knobs working, but for some reason when i start it up in cabbage, and it doesn’t want to output a noise unless i turn the attack knob and only the attack knob. should this be occuring? aside from text, channel, etc, all the code for them is identical. is there a fix for this short of starting a new project?

Change your initial value for your attack slider to 0.001, it’s currently set to 0… :+1: