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
AudioToolbox framework:
MusicTimeStamp. A timestamp for use by a music sequence.
typedef Float64 MusicTimeStamp;
https://developer.apple.com/library/mac/#documentation/AudioToolbox/Refe...
CH3-SW3
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.
Regards,
Pedro
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.