Re: Removing MIDI channel mappings to an AU
Re: Removing MIDI channel mappings to an AU
- Subject: Re: Removing MIDI channel mappings to an AU
- From: William Stewart <email@hidden>
- Date: Thu, 2 Mar 2006 14:45:29 -0800
Rick
We'd generally advise you not to use this API, but rather to set up
your own client of the CoreMIDI API and dispatch to the AU from the
MIDI read proc.
We're planning on deprecating the API in Leopard in any case, and
part of that will also involve rewriting this example.
So, if we could re-frame the conversation in those terms that would
be better I think.
Bill
On 02/03/2006, at 1:18 PM, Rick Cohen wrote:
I am attempting to use AUMIDIControllerMapChannelToAU() in the
prescribed manner in a simple host program, similar to the "Audio Unit
Hosting" example.
I am finding that once I have established a mapping such as this
one...
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
0, // input ch 1
mTargetUnit,
0, // dest ch 1
false );
Then my music device AU receives MIDI events that were transmitted on
channel 1.
But if I try to reassign the input channel to 2 like this...
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
0, // input ch 1
0, // disconnect
0, // dest ch 1
false );
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
1, // input ch 2
mTargetUnit,
0, // dest ch 1
false );
Now my AU is responding to MIDI events received on channels 1 and 2.
The follow-on question is also, if I allow my AU to receive events on
all MIDI channels...
RequireNoErr(AUMIDIControllerMapChannelToAU( mMIDIController,
-1, // all channels
mTargetUnit,
0, // dest ch 1
false );
how can I remove that mapping? Would I need to disconnect all 16 MIDI
input channels individually, or should a single function call suffice?
Thanks in advance!
- Rick Cohen
_______________________________________________
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