• 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: Can you put multiple sysex messages into one large buffer, and use MIDISend()?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can you put multiple sysex messages into one large buffer, and use MIDISend()?


  • Subject: Re: Can you put multiple sysex messages into one large buffer, and use MIDISend()?
  • From: Kurt Revis <email@hidden>
  • Date: Mon, 21 May 2007 10:06:59 -0700

On May 21, 2007, at 12:06 AM, Stephen Kay wrote:

on 5/21/07 2:54 AM, Stephen Kay at email@hidden wrote:


Sorry if this is a FAQ, I thought I remembered seeing something about this
somewhere, but I couldn't locate it.


I know you can't do it with MIDISendSysex(), but I was wondering if you
could put multiple sysex messages into a large buffer, and then send it in
pieces with MIDISend()?


Probably not, it seems to abort at the first F7. It doesn't hurt to ask,
though....

It actually does seem to work that way, just sending chunks of a huge buffer
that has a bunch of different sysex messages in it, without worrying about
where one starts, and where one finishes.


Any caveats about doing this?

Yes, don't. The docs for the MIDIPacket structure, in MIDIServices.h, say:


"In the case of system-exclusive messages, a packet may only contain a single message, or portion of one, with no other MIDI events."

So don't mix sysex data in the same packet as other MIDI data, and don't put the end of one sysex message in the same packet as the start of another sysex message.

Depending on who's parsing the contents of that buffer (another app, a MIDI device driver, or the MIDIServer itself), you might get lucky, but don't count on it. In practice, sysex is flaky enough even if you follow the rules, just due to all the weird devices and software out there -- I don't recommend bending the rules in this case.

--
Kurt Revis
email@hidden

_______________________________________________
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


References: 
 >Re: Can you put multiple sysex messages into one large buffer, and use MIDISend()? (From: Stephen Kay <email@hidden>)

  • Prev by Date: How to pull audio from an AUGraph for bounces?
  • Next by Date: Re: S/PDIF audio output
  • Previous by thread: Re: Can you put multiple sysex messages into one large buffer, and use MIDISend()?
  • Next by thread: Re: SOLVED - Default output device changes - how to be notified?
  • Index(es):
    • Date
    • Thread