• 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: MIDIReceived and virtual sources...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIReceived and virtual sources...


  • Subject: Re: MIDIReceived and virtual sources...
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 12 Jun 2006 11:40:22 -0700

On Jun 11, 2006, at 3:30 PM, Richard Burnett wrote:
I have an AudioUnit that I am trying to create MIDI messages inside of and send them to a virtual port. When The AU gets initialized, I do this:

MIDIClientCreate( CFSTR("testApp"),NULL,this,&midiClient);
MIDISourceCreate( midiClient,CFSTR("out1"),&midiOut);

Then, inside the process method, I create a packetlist and send it with MIDIReceived. When I load up the AU in Rax, I do infact see the port as a midi source. I set it up to send a midi note every so often, and I am sending the data 0x90,50,60 as Byte values.

Just checking: what are you putting in the other fields of the MIDIPacketList?


When I use MIDI monitor on that new port, I see no messages. When I attach that port to something, no notes are triggered. I had it output a message in the portion of the code just after I call MIDIReceived just to make sure I am getting called. The OSStatus that gets returned is 0.

MIDISend and MIDIReceived are slightly challenged when it comes to returning errors; they can detect some obviously bad parameters but they are asynchronous operations; a message is getting queued and actually dispatched at a later time. So I trust that the first parameter to MIDIReceived is your midiOut endpoint that was created by MIDISourceCreate.


Also, MIDI sources, including virtual ones, don't go anywhere unless a receiving client explicitly asks to listen to the source. There are a few brain-dead clients around that enumerate sources in a way that excludes virtual ones. Since you can see your source in Rax, it sounds OK. I'm not sure off the top of my head how MIDI Monitor works with virtual sources -- can you see your source there?

Another test might be to build the midiecho tool in /Developer/ Examples/CoreAudio/MIDI, and hack it to print incoming messages. Do your virtual source's messages appear here?

Doug

_______________________________________________
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


  • Follow-Ups:
    • Re: MIDIReceived and virtual sources...
      • From: Richard Burnett <email@hidden>
References: 
 >MIDIReceived and virtual sources... (From: Richard Burnett <email@hidden>)

  • Prev by Date: Re: Bug in PlayFile.cpp
  • Next by Date: Re: Audio/Video synchronization
  • Previous by thread: MIDIReceived and virtual sources...
  • Next by thread: Re: MIDIReceived and virtual sources...
  • Index(es):
    • Date
    • Thread