[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]



the patch looks nice for me, since I overwrite all the quant defaults where they're 1.0 myself (my hacky class file attached for fun). Of course, I'd want the default for Quant.default to be 0.0  ;  )

But I think the best short term solution given the timescale is just to keep the default as 0.0 in PauseStream:start, and avoid breaking any existing code. 

yes, 'everyone' was probably an over-reaction, but I just had nightmare thoughts of the amount of code that might depend on Task().start or whatever. 

Unless some others join in this thread, we'd probably not be having sufficient debate over the issues. So yes, just changing the default to 0.0 is my vote for minimal fuss for now. 

best,
Nick

Attachment: quantcorrections.sc
Description: Binary data


On 27 Jan 2008, at 23:03, James Harkins wrote:

On Jan 27, 2008, at 5:40 PM, James Harkins wrote:

I just copied it from .resume() - so why was there not this complaint about .resume() ages ago? - but I agree, the default should be consistent - 0.0 - for all of those methods. Will change it.

BTW I thought most people used .play and very few used .start - so does this really hit *everyone's* code?

(And the whole point of the Quant object is that you can subclass it for any usage you like.)

Anyway, really the best thing is to have the default as nil everywhere (which behaves the same as 0).

But that is also going to break code, because Pattern:play has always used 1.0 as the default quant! So I'm a bit amused that it's a problem all of a sudden, now.

So does TempoClock:play and :nextTimeOnGrid. Don't know if I should touch those. Some of the NodeProxy stuff too.

I would be happy with the following patch, because it would let the user decide what they want the default to be globally (a very useful feature that has long been missing). But it does mean that if anyone depends on the occasional 1.0 default, they will see a change in behavior in 3.2.

So... tell me what to do. Backward compatibility, or consistency throughout the new version?

T minus 2 hours...
hjh

Index: Streams/Stream.sc
===================================================================
--- Streams/Stream.sc   (revision 7140)
+++ Streams/Stream.sc   (working copy)
@@ -194,7 +194,7 @@
                ^EventStreamPlayer(this, protoEvent);
        }
 
-       play { arg clock, quant=0.0;
+       play { arg clock, quant;
                clock = clock ? TempoClock.default;
                clock.play(this, quant.asQuant);
        }
@@ -335,7 +335,7 @@
 
        isPlaying { ^stream.notNil }
 
-       play { arg argClock, doReset = (false), quant=0.0;
+       play { arg argClock, doReset = (false), quant;
                if (stream.notNil, { "already playing".postln; ^this });
                if (doReset, { this.reset });
                clock = argClock ? clock ? TempoClock.default;
@@ -379,7 +379,7 @@
        pause {
                this.stop;
        }
-       resume { arg argClock, quant=1.0; 
+       resume { arg argClock, quant; 
                ^this.play(clock ? argClock, false, quant) 
        }
 
@@ -387,7 +387,7 @@
                stream = originalStream
        }
 
-       start { arg argClock, quant=1.0;
+       start { arg argClock, quant;
                ^this.play(argClock, true, quant)
        }
 
@@ -473,7 +473,7 @@
 
        asEventStreamPlayer { ^this }
 
-       play { arg argClock, doReset = (false), quant=0.0;
+       play { arg argClock, doReset = (false), quant;
                if (stream.notNil, { "already playing".postln; ^this });
                if (doReset, { this.reset });
                clock = argClock ? clock ? TempoClock.default;
Index: Streams/Patterns.sc
===================================================================
--- Streams/Patterns.sc (revision 7133)
+++ Streams/Patterns.sc (working copy)
@@ -11,7 +11,7 @@
                ^Pchain(this, aPattern)
        }
 
-       play { arg clock, protoEvent, quant=1.0;
+       play { arg clock, protoEvent, quant;
                ^this.asEventStreamPlayer(protoEvent).play(clock, false, quant)
        }
        // phase causes pattern to start somewhere in the current measure rather than on a downbeat
Index: Core/Nil.sc
===================================================================
--- Core/Nil.sc (revision 7133)
+++ Core/Nil.sc (working copy)
@@ -54,7 +54,7 @@
        play {}
 
        nextTimeOnGrid { arg clock; ^clock !? { clock.nextTimeOnGrid } }
-       asQuant { ^Quant.new }
+       asQuant { ^Quant.default }  //  { ^Quant.new }
 
        swapThisGroup {}



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

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

_______________________________________________
Sc-devel mailing list