[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] SystemClock.play bug is still there



*play { arg task;
var beats, seconds;
task.clock = this;
seconds = thisThread.seconds;
beats = this.secs2beats(seconds);
this.sched(task.value(beats, seconds, this), task)
}

I don't remember what we said we were going to do about this. This means that something elementary like

Routine({ something }).play(SystemClock)

... behaves really badly when called from a different clock.

TempoClock.default.sched(1, {
Routine({
thisThread.clock.beats.debug("inside routine");
1.yield;
thisThread.clock.beats.debug("still inside routine");
}).play(SystemClock);
});

a TempoClock
inside routine: 596.3738365622
still inside routine: 3628.9381260923

Erm, shouldn't that second time be 597.3738365622?

I can't be alone in thinking that's pretty awful.
hjh


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman