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

Re: [Sc-devel] TempoClock : helpfile + useful method addition?



On Dec 23, 2007, at 5:39 AM, Tom Hall wrote:

Hello All

1) bar-related methods aren't documented in the helpfile:
bar, nextBar, baseBar and baseBarBeat

Is anyone planning to do these for 3.2?
If not, am happy to oblige.

Go ahead :)

2) A method to return what beat of the current bar
we're in could be useful for old-fashioned conductor-type counting

See below, Opinions on this?

// returns the beat number of the current bar
// ie range is 0 to (t.beatsPerBar - 1)

+ TempoClock {
beatInBar { ^this.beats - this.bars2beats(this.bar) }
}

Sounds reasonable to me.

The range will really be 0 <= beatInBar < beatsPerBar. If beatsPerBar == 4, you can still have something happen at 3.9999 within the bar, but it properly belongs to the bar that started 3.9999 beats ago.

hjh


: 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