BelaPlatform / supercollider

an environment and programming language for real time audio synthesis and algorithmic composition
GNU General Public License v3.0
14 stars 8 forks source link

remove warnings for out of range analogOut channels #65

Closed giuliomoro closed 3 years ago

elgiano commented 3 years ago

I'm on a Bela mini, so no analogOut channels, and I get insistent warnings, since they are printed in AnalogOut_next_aaa. What if we cache analogPin and print the warning only when it changes?

giuliomoro commented 3 years ago

We would hope to avoid checking at every sample though when the channel changes at audio rate. Issue is that not checking will cause a segmentations fault which is probably not very expected of a language like Sc ... 👍

elgiano commented 3 years ago

So, if I get it correctly, we can't avoid having this check, and my best bet would be to do it at least only when the input changes. If someone changes it every sample at audio rate, they'll get a check (and a warning if needed) at audio rate :)

giuliomoro commented 3 years ago

yes that seems right.

giuliomoro commented 3 years ago

this has been sorted as much as possible in #76 : warning is printed every time analogPin changes and is out of range. So unless you are changing it at audio rate and keep pushing it out of range, you won't get flooded by warnings. Still, could use some added throttling to handle that case, but it's probably good enough as it is.