This is my 1st Cabbage Instrument, would love input or advice from anyone.
There are a couple of things I’d still like to add to it, however, at the moment, the CPU is blowing out after about 30 seconds whenever I play a lot of notes in succession. I’d love any feedback or advice on how to make the code more efficient. I’m neither a coder nor a mathematician, and only a few months new to CSound - so I’m sure I’ve done more than a few silly things here.
From what I can see, to make a big improvement in the performance of your code you can do at least two things:
set the ksmps value to 256. That means 5.8ms of lag when you click on a note, that is still perceived as an immediate response by the human brain, but it will decrease the stress very much on your CPU.
get rid of all those if/then/chnset at the end of your instrument:
set the ksmps value to 256. That means 5.8ms of lag when you click on a note, that is still perceived as an immediate response by the human brain, but it will decrease the stress very much on your CPU.
Thanks for that, I haven’t had time to work on it the last day - but tried this quickly this afternoon and it made it much more usable! Appreciated.