On Monday 16 December 2002 21.59, Paul Davis wrote:
[...]
so yes, ticks-per-beat is still necessary, but its a
constant (1920
in ardour).
I suggest 1.0/beat for XAP. (64 bit double.)
One may claim that that's not an exact representation, but who cares,
as long as it's much more accurate than what you need for sample
accurate timing?
This only really matters to sequencers, and those should probably use
integer b:b:t formats, to avoid rounding errors building up when
manipulating events. Still, I don't think there's a strong motivation
for that either.
[...]
you're
better off specifying tempo as quarter beats/minute
uniformly for the above reasons.
what reasons? after 2 rounds of fairly intense discussion on
ardour-dev, we could find no reason to favor quarters over any
other value. it makes no difference unless all the music you ever
want to handle uses quarters as the beat note value. since this is
demonstrably false, there is nothing particular interesting about
using quarters.
Agreed. (I wasn't thinking straight before.)
XAP tempo:
beats/minute (what most people expect)
beats/second (fits better with Hz for sample rate)
The second does look better to me the more I think about it, but that
"BPM" term is pretty deeply rooted! :-)
[...]
the METER event needs to include
beats-per-measure (floating point value) [ 3, 5, 7, 9.5 etc
] beat-note-value (floating point value) [quarter,1/16th, etc]
i wouldn't make either a float, it is by far too uncommon
to be justified and makes some arithmetic cumbersome.
what arithmetic is cumbersome? beats-per-measure has to floating to
accomodate most non-western music, and if thats a float, you may as
well make beat-note-value the same, to avoid constant casting back
and forth.
Ok, that settles it for me; XAP should express meter as two 32 bit
floats. (Tempo would be a third, but that's redundant, since you'll
need a separate Control for Tempo anyway, to handle "tempo ramping".)
//David Olofson - Programmer, Composer, Open Source Advocate
.- The Return of Audiality! --------------------------------.
| Free/Open Source Audio Engine for use in Games or Studio. |
| RT and off-line synth. Scripting. Sample accurate timing. |
`--------------------------->
http://olofson.net/audiality -'
---
http://olofson.net ---
http://www.reologica.se ---