• 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: Stuck MIDI notes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Stuck MIDI notes


  • Subject: Re: Stuck MIDI notes
  • From: Kurt Revis <email@hidden>
  • Date: Thu, 31 Oct 2002 05:18:42 -0800

On Thursday, October 31, 2002, at 04:34 AM, Philippe Wicker wrote:

Have a look in XFramework/Model/XMIDIClient.cpp, there is a method called NextMIDIEvent. This method contains code that allow to walk through a MIDIPacket event by event. It may not be exactly what you need (it could be useful to get at return the length of the event), but it is surely a good starting point.

Yes--that code implements the basics correctly. Note that this code doesn't handle realtime messages properly, though. The unofficial "MIDI spec" floating around the net says

MIDI allows a RealTime message to be sent at any time, even interspersed within some other MIDI message. For example, a RealTime message could be sent inbetween the two data bytes of a Note On message.

but this code doesn't handle that case.

(Unless CoreMIDI rewrites MIDI data to move realtime messages out of other messages... but that's pretty unlikely. I sure don't think it did when I wrote my parser more than a year ago.)

The moral of the story is: MIDI is a fundamentally irritating protocol.

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

  • Follow-Ups:
    • Re: Stuck MIDI notes
      • From: Philippe Wicker <email@hidden>
References: 
 >Re: Stuck MIDI notes (From: Philippe Wicker <email@hidden>)

  • Prev by Date: Thread context of the MIDI notify proc.
  • Next by Date: Re: Thread context of the MIDI notify proc.
  • Previous by thread: Re: Stuck MIDI notes
  • Next by thread: Re: Stuck MIDI notes
  • Index(es):
    • Date
    • Thread