<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 02.11.2014 00:53, schrieb Robin
Gareus:<br>
</div>
<blockquote cite="mid:54557268.4010101@gareus.org" type="cite">
<pre wrap="">On 11/01/2014 08:10 PM, Clemens Ladisch wrote:
</pre>
<blockquote type="cite">
<pre wrap="">hermann meyer wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap="">
<a class="moz-txt-link-rfc2396E" href="http://en.wikipedia.org/wiki/Phase-locked_loop"><http://en.wikipedia.org/wiki/Phase-locked_loop></a>
<a class="moz-txt-link-rfc2396E" href="http://en.wikipedia.org/wiki/Kalman_filter"><http://en.wikipedia.org/wiki/Kalman_filter></a>
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.
</pre>
</blockquote>
<pre wrap="">
A very good paper with example code:
<a class="moz-txt-link-freetext" href="http://kokkinizita.linuxaudio.org/papers/usingdll.pdf">http://kokkinizita.linuxaudio.org/papers/usingdll.pdf</a>
(ardour uses that approach to filter MTC, LTC and MClk)
ciao,
robin
_______________________________________________
</pre>
</blockquote>
<br>
Thanks for all replies, <br>
At least I didn't look for smoothing value changes, but more for
initial correct bpm values on stable situations.<br>
I solve my issue<i> mostly</i> 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.<br>
<br>
regards<br>
hermann<br>
<br>
<br>
</body>
</html>