On Tuesday 07 February 2012, David Robillard wrote:
Probably not, for most use cases. Bars are required for notation, and useful
for rhythm matters, but the important rhythm element is the beat, and with
beat count and tracking time signature changes you can calculate the bar
numbers very easily.
> * Use floating point? Rounding errors an issue?
This would be my preferred option. It would be similar also to Apple's
MusicTimeStamp. A timestamp for use by a music sequence.
typedef Float64 MusicTimeStamp;
Musical time is traditionally represented by an integer tick count, which
requires the reference of a timebase (ticks per beat) in order to calculate
beats from ticks. Timebase must be carefully chosen (for exact divisors) and
big enough to provide good resolution. Finally, you need the tempo (beats per
minute) to calculate the absolute time. Working directly with beats (and
fractions) would be more natural for applications like
quantization/groove/humanization/swing, or other rhythm effects.
Linux-audio-dev mailing list