I'm working on a piece that will use frequent meter changes (first time in supercollider for me), so I'm looking carefully at TempoClock's setMeterAtBeat method and it seems unnecessarily complex to use.
// meter should only be changed in the TempoClock's thread.
// bar must be integer valued when meter changes or confusion results later.
That's a lot of opportunities to make mistakes in your code.
I don't know to what extent people depend on this method, but this seems to fit the profile of a private method to me (since very specific conditions have to be met before it can be called). I'm tempted to ask if this might be changed to prSetMeterAtBeat and then replace setMeterAtBeat with something that will handle the scheduling for you, e.g.
setMeterAtBeat { arg newBeatsPerBar;
this.schedAbs(this.nextTimeOnGrid(beatsPerBar, 0), {
this.prSetMeterAtBeat(newBeatsPerBar, this.beats);
})
}
But if that carries too much risk of breaking code, I'd be content to call the new method something like setMeterNextBar and leave setMeterAtBeat as is.
Any objections?
hjh
: H. James Harkins
: jamshark70@...
: http://www.dewdrop-world.net
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:
"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal." -- Whitman
_______________________________________________
Sc-devel mailing list
Sc-devel@...
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel