I’m trying to understand when I need to worry about efficiency in doing calculations and when it is already handled by Cabbage/Csound.
As an example, I have a slider that is ultimately used to send a k-signal to several instruments. The slider takes values from 0-1. I use cabbageGetValue to read it into csound. I then transform that value and apply a portamento to smooth when the slider moves. Finally, that signal is sent to the Csound bus using chnset. Several instruments then use chnget to learn the value.
Do I need to worry about the unneeded recalculation of the transformation and the smoothing when the slider value doesn’t change? It seems silly to keep recalculating the same number and assessing if it needs to be smoothed. But maybe that’s handled in csound?
Is a bus the right way to handle sending a control signal across instruments? I noticed that RAM use went up when I switched to this approach, which surprised me. If anything, I thought system demands were going to decrease since I shifted from doing the transformation/portamento globally instead of for each instrument instance.
EDIT - I might have misinterpreted the RAM use. After restarting Cabbage things are back to where I expected.
Thank you!