• 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: Joe Chang (ììí) <email@hidden>
  • Date: Wed, 13 Feb 2002 09:22:52 +0900

Aha, I see.
The current documentation is something like a jigsaw puzzle to me.
If you know the whole picture then it's easy, but if you don't, it's a real puzzle.

It's very lucky that there are many people who already know the solutions,
but I'm really looking forward to have the upgraded documentation.

Thank you!
Joe.

On Wednesday, February 13, 2002, at 02:00 AM, Doug Wyatt wrote:
On Tuesday, February 12, 2002, at 08:59 , Joe Chang (l%l,m8) wrote:
<CoreMIDI/MIDIServices.h> says:
Since MIDI applications will tend to do a fair amount of
math with the times of events, it's more convenient to use a
UInt64 than an AbsoluteTime.

OK, but what is the format or unit (milliseconds?) of time-stamp in UInt64?

The paragraphs before the one you quoted:

@typedef MIDITimeStamp

@discussion A host clock time representing the time of an event, as
returned by AudioGetCurrentHostTime() (or UpTime()).

If I want to send a note-on message right now and note-off message after 1 second, what time-stamp values should I set for each MIDIPacket?

"Now" is most simply represented by a timestamp of 0.

The MIDITimeStamp for one millisecond from now is

const UInt64 kOneMillisecondOfNanos = 1000000;
MIDITimeStamp now = AudioGetCurrentHostTime();
MIDITimeStamp oneMillisecondFromNow = now +
AudioConvertNanosToHostTime(kOneMillisecondOfNanos);

Doug
_______________________________________________
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.

  • Prev by Date: Re: OSX Drivers Available Now
  • Next by Date: mLan support?
  • Previous by thread: Re: MIDITimeStamp ?
  • Next by thread: Marketing support for Apple ISVs
  • Index(es):
    • Date
    • Thread