Re: Finding the duration of a MidiFile
Re: Finding the duration of a MidiFile
- Subject: Re: Finding the duration of a MidiFile
- From: Peter Zegelin <email@hidden>
- Date: Thu, 5 Oct 2006 16:09:42 +1000
On 05/10/2006, at 1:45 AM, Doug Wyatt wrote:
On Oct 3, 2006, at 21:20 , Peter Zegelin wrote:
Does CoreAudio have an easy way to determine the duration of a
MidiFile? I am using the MusicPlayer API and cant find anything
relevant.
You can get the length of each track in beats; the length of the
longest track is the file's duration in beats (assuming that the
end-of-track markers are reasonably close to the ends of the last
notes).
But there's no simple way to convert that to seconds without either
assuming that the tempo track is trivial (i.e. only has one tempo)
or building a tempo map and doing the math.
--
Doug Wyatt
Core Audio, Apple
OK, pity - but thanks!
Peter Zegelin
www.fracturedSoftware.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden