creeping time offset between internal clock time and audio sample time

Diemo Schwarz's icon

Hi, when the DSP graph is changed, the sample clock looses a few vectors compared to Max's internal clock, see patch below. This is probably unavoidable, but it forces you to be super careful when recording audio and events in parallel, since the event timestamps drift apart from the audio events, as soon as you open or edit another patch during recording.
Sooooooo, I wonder if there's an easy way to detect this in C (for our own event recorder mubu.record) or in the patch? ...preferably without having to make the event recorder external a DSP object and count samples to derive timestamps.
Cheers!

max-time-offset.maxpat
Max Patch

Diemo Schwarz's icon

bump...
any ideas?