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

Re: [Sc-devel] 3.2 RC cutoff time [was Re: Quarks and svn]

On Jan 27, 2008, at 8:05 PM, Josh Parmenter wrote:

Hi all... anything more? If so... I'm going to have dinner before doing any packaging... (so there is some more time).

I'm done.

For full disclosure -- I did commit the quant default because a/ I'm very confident it will work and b/ if there any problems, we need to identify them during the RC phase.

The play methods of Stream, PauseStream (ergo Task) and EventStreamPlayer do .asQuant on the value that you pass in for quant, the result of which is a Quant object. We designed this for backward compatibility so that the previously existing uses would behave as they did before:

nil - schedule for "now"
number - schedule for next multiple of this number
[quant, phase] - schedule for (k * quant) + phase, where k is an integer

nil.asQuant --> Quant(0, nil, nil)
number.asQuant --> Quant(number, nil, nil)
[quant, phase].asQuant --> Quant(quant, phase, nil)

These values get passed over to clock.nextTimeOnGrid(quant, phase) so that

[quant, phase].nextTimeOnGrid(clock) == Quant(quant, phase).nextTimeOnGrid(clock)

So the new method uses the Quant as an intermediary (which means, you can use a different object with the same interface to override the default logic). But this is transparent for the previously existing cases. (Well, Julian had to change something for PatternProxy, but that's outside the common library proper.)

Quant.default is normally Quant(0, nil, nil) -- so it will schedule just like 0.0.

So I hope that dispels some doubts -- it's new, but Quant and .asQuant themselves have been checked in for couple of weeks now and nobody has complained about broken code. If this were a bad or seriously risky approach, I think we would have heard objections by now.


PS Actually, nil.nextTimeOnGrid(clock) rounds up to the next whole beat because JMc set the quant default in TempoClock:nextTimeOnGrid to 1! So we're changing that, but I think the new usage makes more sense.

: H. James Harkins

: jamshark70@xxxxxxxxxxxxxxxxx

: http://www.dewdrop-world.net


"Come said the Muse,

Sing me a song no poet has yet chanted,

Sing me the universal."  -- Whitman