[sdiy] MIDI Clock sync advice

Roman Sowa modular at go2.pl
Sun Mar 10 11:17:57 CET 2024


That question triggered an avalanche of replies.
Here's my 3 grosze to it

What I did in my trigger to MIDI clk module was to measure the time 
between incoming pulses then divide the result by 4 (in this case of 24 
to 96 conversion) and feed it as period for another timer, which 
overflow causes MIDI clk message to be sent.
Simple as that. Responds immediately to any changes in incoming tempo, 
right at the next pulse ariving.

Roman

W dniu 2024-03-08 o 16:10, Tom Wiltshire pisze:
> 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: Synth-diy at synth-diy.org
> View archive at: https://synth-diy.org/pipermail/synth-diy/
> Check your settings at: https://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org



More information about the Synth-diy mailing list