Hi all,
I’ve recently programmed Arduino with the Mozzi library. In Mozzi, we have an audio callback and a control callback, where the audio callback should be kept short and lean so we don’t get any glitches in the output. Hardware polling (checking buttons and pots etc) is in the control callback, which runs much less often.
I know the Daisy is a much faster beast. But I am new to it. I’ve looked at some example programs, for example the EuclidianDrums, where everything is done in the audio callback routine: filling the buffer, but also keeping time, checking buttons and pots etc.
Wouldn’t it be better to place everything else in the forever-loop at the end of main() so as to keep the audio callback short and fast? Or will I get problems communicating with the callback logic?
Thanks,
Staffan