• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: MIDITimeStamp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDITimeStamp


  • Subject: Re: MIDITimeStamp
  • From: Kurt Revis <email@hidden>
  • Date: Wed, 1 Oct 2003 10:52:09 -0700

On Wednesday, October 1, 2003, at 01:27 AM, Mark Woollard wrote:

Could someone elaborate on the details of the MIDITimeStamp? What units are used?

First of all, the MIDITimeStamp units are exactly the same as the HostTime that CoreAudio uses. See this file:
/System/Library/Frameworks/CoreAudio.framework/Headers/HostTime.h

These timestamps come from the processor's timebase register, which is the highest-resolution clock on the system. Most (if not all) of the OS depends on this clock for timing

The exact units depend on what machine you're running on. On machines before the G5, the HostTime updates at 1/4 the processor bus frequency. I don't know about the G5.

Of course, you shouldn't need to know any of that. To convert to or from seconds, just use the functions in HostTime.h.

Am I correct that its based on the time the system has been up rather than how long the app has had an input port open?

I would expect that the clock is zeroed when the machine boots, but I'm not absolutely sure. In practice it doesn't matter. You never care about the absolute value of the clock, just differences between different timestamps.

--
Kurt Revis
email@hidden
_______________________________________________
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.

References: 
 >MIDITimeStamp (From: Mark Woollard <email@hidden>)

  • Prev by Date: Re: How to return MusicDevice from SF2 to GM?
  • Next by Date: Average amptitude threshold for silence detection
  • Previous by thread: MIDITimeStamp
  • Next by thread: Re: MIDITimeStamp
  • Index(es):
    • Date
    • Thread