Hi all,
Is there a document around for optimizing the performance of our code specifically for csound ?
just some guidelines like this:
regards,
Yorick
Hi all,
Is there a document around for optimizing the performance of our code specifically for csound ?
just some guidelines like this:
regards,
Yorick
No, at least none Iām aware of. It would be nice, although, itās much harder to write completely inefficient code with Csound than C/C++. The biggest issue I see with Cabbage code is users calling cabbageSet
on each cycle. Thatās a performance red-flag every time.
I try to trigger code as conditionally as possible. Here are some things Iāve started doing that have improved the performance of my plugins:
changed2()
to trigger cabbageSet
kTrig
from cabbageGetValue
event
Is using a kTrig to a cabbageSet statement like an āifā where the statement would be ignored entirely ?
The only issue I had with this is that double-clicking a widget to default value doesnāt get detected by the trigger, so I had to enter ā1ā as kTrig for it to work at the moment.
It should get picked up if the widget isnāt at its default value?
Recently started doing kTrig at ācabbageGetValueā simply for using less lines.
There was no āchanged2()ā-version for kTrig at cabbageGetValue-statement, which would have been nice though.
Havenāt had much need so far for event statements.
Thanks for adding your tips !
I used 2 widgets representing the same value, which both used a trigger to update the other.
When I double-clicked 1 of them, I do an opcode to get a derived value from the main value for the other widget.
Using kTrig, it gets triggered but doesnāt give the right value most of the time.
It only works every time when I remove the kTrig.
Could you prepare a small example of this?
Hmm,
Not gonna work
The problem disappeared in a stripped down version ā¦
Iāll take a look at it when I have time,
thanks anyway.
rgds