Re: A Couple of Midi Tempo and TimeSig Questions
Re: A Couple of Midi Tempo and TimeSig Questions
- Subject: Re: A Couple of Midi Tempo and TimeSig Questions
- From: Peter Zegelin <email@hidden>
- Date: Thu, 15 Apr 2004 10:59:26 +1000
On Thursday, April 15, 2004, at 05:07 AM, William Stewart wrote:
When Core Audio builds its special Tempo track does it only look for
Tempo and TimeSignature events in track 1 of the Midi file? The reason
I ask is that I've only ever read that Tempo and TimeSig events are
*supposed* to be in track 1 but not that they *must* be in track 1.
For cross platform reasons I'm generating my own list of these events
and want to make sure I'm doing the same thing as Core Audio.
Any tempo event in the file is added to the sequence.
Looks like I'd better change mine as I'm only looking in track 1 at the
moment.
Also is there any default maximum Tempo value? I'm generating a
fairly standard squiggly line type Tempo view and was wondering what a
reasonable maximum might be. At the moment I am actually calculating
the maximum tempo for the current file and using that, but is there
some sort of standard?
We actually have a bug with files that don't have a tempo event in
them... I'd generally consider these badly authored files, but it is
something we should have guarded against properly and didn't! The
default tempo that most people are using (including ourselves) is 120
bpm
Is this bug something we have to worry about? I currently add a Tempo
object (120 bpm) to my list if there is either no Tempo at all or the
first one starts after the beginning of the sequence. There are lots of
files without a Tempo event.
However my question was more about what would be a reasonable maximum
for display purposes. All the other events that are commonly displayed
(and edited) as a squiggly line (not sure of the correct term here!)
have defined minimum/maximum values - whereas Tempo events don't, and I
was just wondering if there is a commonly used value (say 500).
Finally I have a slightly off topic question regarding TimeSignature
events. From my (limited) understanding of music theory, a time
signature must be for a whole measure i.e. you cant change time sigs
in the middle of a measure. However, the way midi is set up it is
actually possible to do this even though it would be incorrect. Is
there some sort of standard on how midi players (or Core Audio) handle
this situation? Do you just finish the measure when a new timesig
event arrives and start again from that point?
We don't do anything with the Time Sig (except preserver them of
course) - it doesn't have any affect on the playback of a MIDI file,
but rather on its presentation
thanks! I somehow thought that they may be used in beat calculations or
something - but yes I was thinking about the presentation.
thanks!
Peter
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.