Perhaps a question for Pierre? (Can't figure out how to @ people with a space in their name... @Pierre-Guillot)
I've just been fiddling around with PlugData. I found in this project's issue reports that you can use [r playhead] (same as Camomile) to get information about play state, tempo, position etc.
I would like to attach "position" messages to my scheduler object, but I don't quite understand the position values that are being reported. Documentation seems scarce.
When the project is playing, [r playhead] emits messages like:
[ position, 11.842176437378, 261120.0, 32.0, 4.0, 5.921088218689 ]
[ position, 11.88861656189, 262144.0, 32.0, 4.0, 5.9443082809448 ]
[ position, 11.935056686401, 263168.0, 32.0, 4.0, 5.9675283432007 ]
[ position, 11.981496810913, 264192.0, 32.0, 4.0, 5.9907484054565 ]
[ position, 12.027936935425, 265216.0, 32.0, 4.0, 6.0139684677124 ]
[ position, 12.074376106262, 266240.0, 32.0, 4.0, 6.0371880531311 ]
[ position, 12.120816230774, 267264.0, 32.0, 4.0, 6.060408115387 ]
To work with the scheduler, I need to be able to anticipate the next tick time. The difference between successive beats (first number) appears to be consistently 0.04644012, and this seems to be proportional to tempo (160 bpm gets 0.061919212341).
Does anyone know what the exact relationship is? I can check tomorrow if it's consistent across DAWs too, but not today.
Data collection patch is (sending by OSC because I couldn't copy/paste the log within PlugData's window):
hjh