Cabbage Logo
Back to Cabbage Site

Clipping when note off


I was trying to make a synth instrument which runs normally in Csound, but it sounds totally different in Cabbage. The sustain parameter does not works since I cannot hold a note anymore, and there is always a clipping sound when I leave the note off.

I would really appreciate it if anyone can help! Thank you :slight_smile:

You’ll need to post your code. It’s impossible to tell without seeing the example.

Thanks a lot Rory! I have my code uploaded here.
I just updated Cabbage because it did not have cabbageSet, but now the instrument cannot be run (109.2 KB)

I’m loving the Halloween vide here!! You need to add guiMode("queue") to your form declaration in order to use the cabbageSet/Get stuff. Some other things to note:

  • don’t set the sampling rate in Csound, Cabbage will do this automatically and when you export your plugin the host will set the sampling rate. Otherwise you will get pitching issues

  • Instrument 2 is never started. you need to trigger it from the score, i.e, i2 0 z

  • Don’t use k-rate variables for your envelop controls, just use i-rate. Then you don’t have to cast/wrap your k-rate variables with i()

    iatk chnget “rAttack”
    irel chnget “rRelease”

  • Move the cabbageSet/Get stuff into instrument 1. This is the instrument that gets triggered when you play a note, so it’s here you should update the images.

Good luck with your Halloween Synth :wink: (109.2 KB)
Thank you so much for all the details and suggestions!
It seems like the interface still does not show up when I hit Play, and it gets stuck when I tried to hit Stop. It does not switch back to Play anymore. I would really appreciate it if you could check it out :)))

You have queue spelling wrong. Also, you should only use i-rate channels for the parameters that are i-rate. You have now swapped out valid k-rate channels for i-rate versions, which doesn’t make any sense. For example, it makes little sense to use an i-rate value to control a filters bandwidth or frequency. Doing so will mean you can’t update the parameters in realtime while the instrument is playing.

Thanks a lot! I fixed the issues and the interface did not respond to the Play/Stop at first, but it came back to normal after a while :))) I really appreciate your patience and kindness!

However, I am still getting clips and pops when it’s note-off and there is no sustain to the envelop :frowning:

I got it! Typo issue :sweat_smile:

1 Like