<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">Hello Tom<br>
<br>
I doubt it is what you are looking for, but I recently wrote an
Arduino software for a simple clock conversion module:<br>
<a class="moz-txt-link-freetext" href="https://www.florian-anwander.de/clockboy/">https://www.florian-anwander.de/clockboy/</a><br>
<a class="moz-txt-link-freetext" href="https://www.florian-anwander.de/clockboy/clockboy_1-22.ino">https://www.florian-anwander.de/clockboy/clockboy_1-22.ino</a><br>
<br>
Florian<br>
<br>
Am 08.03.24 um 16:10 schrieb Tom Wiltshire:<br>
</div>
<blockquote type="cite"
cite="mid:5651497C-F5F5-4851-9729-2749E3852567@electricdruid.net">
<pre class="moz-quote-pre" wrap="">Hi All,
Has anyone got any experience dealing with writing software to sync to MIDI clock that they can share?
I'm working on a drum sequencer which will run at 96PPQN, and it'd be nice if it could sync to incoming 24PPQN MIDI Clock messages.
I can see a couple of ways to do this:
1) Some sort of PID controller, where we compare the internal timing and the incoming clock timing and derive some error signals.
2) IIR filtering. We measure the time between incoming clocks and then use an IIR filter to provide some averaging and smoothing. We then set the internal clock based on the filter's output.
(2) seems like the simpler approach. Clearly it will introduce some lag when changing tempo, but I'm not sure I see this as a fault - smooth tempo changes could be a feature. And depending on how much filtering is required, that lag might actually be quite short. What's a reasonable time constant for such a thing?
How has this been approached in the past? I know that I'm not the first person to do this, so I'm just trying to avoid re-inventing the stone-age MIDI wheel!
Many thanks for any ideas/pointers offered,
Tom
==================
Electric Druid
Synth & Stompbox DIY
==================
________________________________________________________
This is the Synth-diy mailing list
Submit email to: <a class="moz-txt-link-abbreviated" href="mailto:Synth-diy@synth-diy.org">Synth-diy@synth-diy.org</a>
View archive at: <a class="moz-txt-link-freetext" href="https://synth-diy.org/pipermail/synth-diy/">https://synth-diy.org/pipermail/synth-diy/</a>
Check your settings at: <a class="moz-txt-link-freetext" href="https://synth-diy.org/mailman/listinfo/synth-diy">https://synth-diy.org/mailman/listinfo/synth-diy</a>
Selling or trading? Use <a class="moz-txt-link-abbreviated" href="mailto:marketplace@synth-diy.org">marketplace@synth-diy.org</a>
</pre>
</blockquote>
<br>
</body>
</html>