Looking through the Fundamental modules for examples of dsp::ClockDivider usage as pertaining to module lights, I’ve noticed that different modules use a different division. Some are as low as 16 (VCO, Viz) and others as high as 512 (Merge, Split).
What’s best practice here for determining the division setting?
It seems to me that anything resulting in a higher rate than Rack’s frame rate is unnecessary, so the ideal division would be something like
x = SampleRate/FrameRate. Even at 44.1kHz with Rack’s maximum frame rate of 60hz, that yields
x = 735 which is higher than the largest division seen in Fundamental.
But maybe that’s all beside the point, and the better question to ask is: why update the lights on the DSP thread at all, rather than using the UI thread?