Looks like this has been covered before and is something in the bowels of Erlang (Is it possible to control via Sonic Pi an instrument in Ableton? - #34 by ian) but I have pretty pictures so I thought I would post them. I backed into this problem so my test harness is probably needlessly complicated as I wasn’t sure where the jitter was originating. Should have searched here first :).
- Sonic Pi sending an OSC packet every 100ms.
- esp32 that is flipping a pin via the hardware clock (very precise) every 100ms. Also flips a pin when it gets an OSC packet.
- logic analyzer with PulseView and the jitter command to see the relationship between the two pins
- R code to analyze it
win-wifi* runs send the packet over wifi to the wsp32.
*rs485 use a python bridge on the host and send data via serial.
You’ll see here the macos based one is spot on. But the windows has bimodal jitter due to inaccuracies in the erlang scheduler.
This is running v3.3.1 and makes it clear I should be using my old mac laptop for this project.