• 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: Example Code for CoreMidi OUT
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example Code for CoreMidi OUT


  • Subject: Re: Example Code for CoreMidi OUT
  • From: Robert Grant <email@hidden>
  • Date: Wed, 11 Dec 2002 10:45:16 -0500

Hi Mark,

It's actually pretty straight forward:

MIDIPacketList pktlist;
MIDIPacket* packet;
packet = MIDIPacketListInit(&pktlist);
packet = MIDIPacketListAdd( &pktlist,
sizeof(MIDIPacketList),
packet,
/* time stamp */, // I typically use AudioGetCurrentHostTime()
/* size of msg in bytes */,
/* actual MIDI msg */);

// If you're sending to a particular endpoint (you'll need to create a port first):

MIDISend( /* output port */, /* to endpoint */, &pktlist);

// Alternatively if you've created a virtual destination you can just use:

MIDIReceived(gInternalDest, &pktlist);

HTH,

Robert.

On Wednesday, December 11, 2002, at 10:26 AM, Mark Gilbert wrote:

Folks.

I have implemented coremidi support into my app, and finding ports, reading midi, is all working OK.

Now I come to the code which SENDS OUT midi messages, and I realise that the echo sample code provides virtually no information on how to send midi messages. It just echos an existing packetlist.

Can anyone direct me to sample code to actually create packetlists from scratch.

Thanks

Mark Gilbert.
--
email@hidden
Tel: +44 208 340 5677
fax: +44 870 055 7790
http://www.gallery.co.uk
Check out the **new** mtools site at:
http://www.mtools.info
_______________________________________________
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.
_______________________________________________
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: Example Code for CoreMidi OUT
      • From: Angelo Fraietta <email@hidden>
References: 
 >Example Code for CoreMidi OUT (From: Mark Gilbert <email@hidden>)

  • Prev by Date: Example Code for CoreMidi OUT
  • Next by Date: AU Indexed parameters problems
  • Previous by thread: Example Code for CoreMidi OUT
  • Next by thread: Re: Example Code for CoreMidi OUT
  • Index(es):
    • Date
    • Thread