• 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: Confused about OpenAComponent vs AUGraphNewNode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confused about OpenAComponent vs AUGraphNewNode


  • Subject: Re: Confused about OpenAComponent vs AUGraphNewNode
  • From: William Stewart <email@hidden>
  • Date: Mon, 13 Aug 2007 14:22:52 -0700


On 12/08/2007, at 1:46 PM, Todd Blanchard wrote:

I'm building a system for allowing playing of MIDI virtual instruments live. So far I've been creating my music devices using OpenAComponent, then calling AudioUnitInitialize, then AUMIDIControllerCreate to create the MIDI interface for it.

AUMIDIControllers are fine, but we've deprecated them in Leopard (they will continue to work). We felt that they weren't getting enough use and the API was not really good at providing the customised behaviours that we were hoping to achieve by using this API.


So, the preferred way to do MIDI to an AU is to interact directly with the MIDI APIs - sign into CoreMIDI, instantiate a callback and dispatch the MIDI directly to the AU. In the MIDI folder in the SDK (/ Developer/Examples/CoreAudio) there is example code that does this. It should be pretty straightforward.


Now I'm looking at setting up a mixer and it looks like AUGraphNewNode opens (instances) the component - how much more does it do for me? Does it initialize it? Will it create a midi interface for it if it is a music device? I can't seem to figure out how smart AUGraphNewNode is and it seems like a completely different approach than the


OpenAComponent
AudioUnitInitialize
AUMIDIControllerCreate

or...

do I just let AUMIDIControllerCreate do the equivalent of OpenAComponent, then call AUGraphGetNodeInfo to get the AudioUnit and then call AudioUnitInitialize and AUMIDIControllerCreate myself?

It just isn't clear from the docs at all how this is supposed to fit together.

An AUGraph manages the audio unit state for you - it will open and initialise the AUs it contains, allows you to connect them up, etc. The PlaySequence (and PlayFile) code in the SDK has a good example of doing this.


It doesn't do anything for MIDI - you need to get the AU from the graph, and then handle the MIDI side on your own.

Bill


-Todd Blanchard _______________________________________________ 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

--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________ __
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________ __


_______________________________________________
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: 
 >Confused about OpenAComponent vs AUGraphNewNode (From: Todd Blanchard <email@hidden>)

  • Prev by Date: Re: Flush CoreAudio Component
  • Next by Date: How CoreMIDI works with SysEX
  • Previous by thread: Confused about OpenAComponent vs AUGraphNewNode
  • Next by thread: How CoreMIDI works with SysEX
  • Index(es):
    • Date
    • Thread