[LAD] Re: Admissable clock inaccuracy for MIDI

2023-02-22 Thread Fons Adriaensen
On Wed, Feb 22, 2023 at 01:28:21PM +0100, Jeanette C. wrote: > Thanks Fons! I was really confused about that myself. Mixing up the > mechanism of sleeping for a specified duration and sleeping until a > specified point in time. Only the latter is correct. BTW, just using sem_timedwait ()

[LAD] Re: Admissable clock inaccuracy for MIDI

2023-02-22 Thread Jeanette C.
Hi Fons! Feb 22 2023, Fons Adriaensen has written: ... This is very strange: miss_time = now - wakeup; wakeup = now + (delta - miss_time); Which just means: wakeup += delta; So it's not wrong, just confusing by suggesting this somehow compensates for the previous tick being late. It doe

[LAD] Re: Admissable clock inaccuracy for MIDI

2023-02-22 Thread Fons Adriaensen
On Wed, Feb 22, 2023 at 10:52:49AM +0100, Jeanette C. wrote: > https://www.dropbox.com/s/b0bh9pxsqzmar5j/midiclock.cpp This is very strange: miss_time = now - wakeup; wakeup = now + (delta - miss_time); Which just means: wakeup += delta; So it's not wrong, just confusing by suggestin

[LAD] Re: Admissable clock inaccuracy for MIDI

2023-02-22 Thread Jeanette C.
Hi Florian, thanks for your considered response and questions. Here's my goal and progress so far... Feb 22 2023, Florian Paul Schmidt has written: ... Are you trying to implement MIDI Time Code (MTC) or MIDI Clock (MC)? Are you trying to implement changing the timing of incoming MIDI events? Or

[LAD] Re: Admissable clock inaccuracy for MIDI

2023-02-22 Thread Florian Paul Schmidt
Hi Jeanette, On 2/21/2023 12:36 AM, Jeanette C. wrote: [...] With the standard chrono and thread library my ticks are usually out by anything between 150.000 to 290.000 nanoseconds. Using boost a tick is out anything between 110.000 to 124.000 nanoseconds. Yes, much better. But, assuming that