I’m coding an external for Max 6.1, and have the following code that attempts to set the current time of a scheduler to 0:
x->playbackClock = scheduler_new();
// some time passes
scheduler_gettime (x->playbackClock, &currTime );
post("Tried setting to zero, but got %f",currTime);
If I understand correctly, I should get a value of almost 0 (perhaps a millisecond or two might pass between the settime and gettime).
But instead I get the following output in the Max window:
Tried setting to zero, but got 4289.000000
Tried setting to zero, but got 5291.000000
Tried setting to zero, but got 7446.000000
This is just the elapsed time since the patch opened. Is there are bug, or am I misunderstanding the creation of a local scheduler?
I’m glad it’s not just me! I find the documentation completely opaque and confusing. (clocks, setclocks and schedulers? argh!)
I think I’ll just call the system clock and do a subtraction.
C74 RSS Feed | © Copyright Cycling '74