Re: [LAD] Midi Beat Clock to BPM

From: hermann meyer <brummer-@web.de>
Date: Sat Nov 08 2014 - 20:04:06 EET

Am 02.11.2014 00:53, schrieb Robin Gareus:
> On 11/01/2014 08:10 PM, Clemens Ladisch wrote:
>> hermann meyer wrote:
>>> I try to fetch the bpm from the Midi Clock, and stumble over "jitter".
>>>
>>> How do you usually fetch the bpm from Midi Clock, any pointer will be welcome.
>> <http://en.wikipedia.org/wiki/Phase-locked_loop>
>> <http://en.wikipedia.org/wiki/Kalman_filter>
>>
>> MIDI clock is interesting, because deviations from the predicted clock
>> frequency are either errors and must be suppressed, or are because of
>> a change in tempo and must replace the old clock rate.
>>
> A very good paper with example code:
> http://kokkinizita.linuxaudio.org/papers/usingdll.pdf
> (ardour uses that approach to filter MTC, LTC and MClk)
>
> ciao,
> robin
> _______________________________________________

Thanks for all replies,
At least I didn't look for smoothing value changes, but more for initial
correct bpm values on stable situations.
I solve my issue/mostly/ by adding the event frame time
(nsec)(1000000000.0 / (sample rate / frame_time)) to clock_gettime. This
lead to correct bpm values with max ~1bpm offset.

regards
hermann

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-dev
Received on Sat Nov 8 20:15:02 2014

This archive was generated by hypermail 2.1.8 : Sat Nov 08 2014 - 20:15:02 EET