• 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: Midi timing issues
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Midi timing issues


  • Subject: Re: Midi timing issues
  • From: Kurt Revis <email@hidden>
  • Date: Sun, 28 Apr 2002 06:14:07 -0700

On Sunday, April 28, 2002, at 05:41 AM, Pascal Goguey wrote:

Does anybody know how to send play requests in a sequence?
Is it right to use time stamps? Do I ues the right time function ?
I use AudioGetCurrentHostTime because there is apparently no time
function in the midi framework itself, but... just wondering.

You are on the right track, but you should also look at the other functions in HostTime.h. For example, if t is the current time, a time 1 second in the future would be t + AudioConvertNanosToHostTime(1000000000).

By the way, what is the unit for timestamp? I tried mulyipliers from
1 to 1.000.000, but it doesn't matter.

It depends on what machine you are running on. Generally the smallest unit is 1/4 of the bus speed, if I remember correctly, but that could change any time. Use AudioGetHostClockFrequency() and AudioGetHostClockMinimumTimeDelta() to find the actual values.

2. About the packet list:
What is the maximum number I can add to a packet list?
Is it limited by the computer's memory?

The MIDIPacketList structure can be very large. (It can have 2^32 MIDIPackets, each of which may be up to 10 + 2^16 bytes long... if you do the math, this comes out to Very Big.) Of course this is limited by the available address space in the computer, which is only 2^32 itself. In reality, you will never need anything even remotely close to that large.

Unfortunately, CoreMIDI will currently crash if you try to send a packet list which is longer than approximately 1024 bytes. This has supposedly been fixed for the next major release (10.2 or whatever it will be called).

--
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: 
 >Midi timing issues (From: Pascal Goguey <email@hidden>)

  • Prev by Date: Midi timing issues
  • Next by Date: Re: CoreMIDI question
  • Previous by thread: Midi timing issues
  • Next by thread: Soundfont sf2 support
  • Index(es):
    • Date
    • Thread