It's a good point.
My goal was to get the syncs to approximately match the input
frequency. Consider a case where there was a change on average every
four seconds. Under the existing system the syncs would self-adjust
so that they are oscillating between three and five seconds.
Implementing the scheme you propose would mean that syncs would be
saw-toothing between one and five seconds.
What I've got is optimum for the case where input levels hold at a
reasonably fixed rate for a while. However I have not gathered data
on whether or not this is optimum for typing patterns. That would
definitely be something very interesting to look at. It would not
surprise me if your sawtooth scheme would be a better fit for
burstable typing patterns.
The computeSyncInterval function is isolated specifically so that it
is very easy to override.
--
Neil Fraser, Programmer & Wizard
http://neil.fraser.name