[sdiy] Beat timing calculations
Andre Majorel
aym-htnys at teaser.fr
Thu Jul 28 10:06:31 CEST 2011
On 2011-07-27 14:48 -0700, Joel B wrote:
> I'll try switching to double precision as well, see if that
> improves things.
>
> I don't at the moment have access to the sample-clock, I only
> have a millisecond counter.
Since you're new here, I'll seize the opportunity to let you
know that it would be nice if you didn't top-post. There's
already way too much of that on this list.
If you truncate the period in ms, the error on the tempo can be
up to about +2 BPM.
183 BPM = 81.97 ms/semiquaver
81 ms/semiquaver = 185.18 BPM
Rounding the period properly ((int) (period + 0.5)) halves the
error.
--
André Majorel http://www.teaser.fr/~amajorel/
More information about the Synth-diy
mailing list