• 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: Sending out through virtual MIDI sources on iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending out through virtual MIDI sources on iOS


  • Subject: Re: Sending out through virtual MIDI sources on iOS
  • From: Charlie Roberts <email@hidden>
  • Date: Thu, 10 Nov 2011 10:00:15 -0800

I think you might be skipping the first packet...

if (i != 0) packet = MIDIPacketNext(packet);

- Charlie

On Thu, Nov 10, 2011 at 2:05 AM, Michael Tyson <email@hidden> wrote:
Hey list,

I'm *this* close to having a fully functioning clock send/receive from my iOS app, but I'm having problems figuring out how to put the clock on my app's virtual source endpoint, so other apps can listen to it.

I've created the virtual source with:

OSStatus s = MIDISourceCreate(client, (CFStringRef)sourceNameString, &virtualSourceEndpoint);

...Then, when I'm ready to send messages:

   // Assign proper timestamps to packetList
   MIDIPacket *packet = &packetList->packet[0];
   for ( int i = 0; i<packetList->numPackets; i++ ) {
       packet = MIDIPacketNext(packet);
       if ( packet->timeStamp == 0 ) {
           packet->timeStamp = (MIDITimeStamp)mach_absolute_time();
       }
   }

   // Send it
   OSStatus s = MIDIReceived(virtualSourceEndpoint, packetList);
   NSLogError(s, @"Sending MIDI");


This all seems to happen without a hitch (no errors reported), but the other app I'm testing it with, MoDrum, doesn't see anything on the other end, and neither does the Midi Monitor app.

Is there a step I've missed in the initialisation, perhaps?

Many thanks,
Michael



--
Michael Tyson | atastypixel.com
A Tasty Pixel: Artisan apps

aim: mikerusselltyson
twitter: MichaelTyson

 _______________________________________________
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

 _______________________________________________
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: 
 >Sending out through virtual MIDI sources on iOS (From: Michael Tyson <email@hidden>)

  • Prev by Date: Re: Clicking filter
  • Next by Date: Re: kAudioFormatUnsupportedDataFormatError
  • Previous by thread: Sending out through virtual MIDI sources on iOS
  • Next by thread: Clicking filter
  • Index(es):
    • Date
    • Thread