Re: Adding code for handling notes to an AU
Re: Adding code for handling notes to an AU
- Subject: Re: Adding code for handling notes to an AU
- From: William Stewart <email@hidden>
- Date: Wed, 26 Mar 2008 11:18:21 -0700
your AU needs to be of type (your .r file)
kAudioUnitType_MusicEffect = 'aumf',
(it will currently be 'aufx')
Your AU should subclass:
AUMIDIEffectBase
(currently it probably subclasses AUEffectBase)
AUMIDIEffectBase has methods in it for the MIDI dispatch methods (from
AUMIDIBase) - which have a couple of virtual methods to handle the
MIDI messages, so you just need to implement these:
in particular:
virtual OSStatus YourAU::HandleNoteOn( UInt8 inChannel,
UInt8 inNoteNumber,
UInt8 inVelocity,
UInt32 inStartFrame)
{
your code here
}
I think that should just about do it for what you describe.
Both Logic (and AULab) will then notice that your AU can handle MIDI
directly, and will offer you options to route MIDI to your AU
Bill
On Mar 26, 2008, at 12:09 AM, tahome izwah wrote:
Hi all,
I've just completed my little pitch shifting plug in based on Stephen
Bernsee's dspdimension.com code and the Cocoa AU template (using
AUEffectBase) and so far it is working great in Logic. I was thinking
about adding note control to it, ie. I'd like to change the pitch
shift factor by playing notes on a keyboard or with notes that I
pre-record on a track with Logic.
What changes do I need to implement in my project in order to have my
AU appear as a MIDI destination in Logic? I don't want to start off
with an entirely different project so I'm just looking for the changes
that I need to implement to get note information from the host... I
wasn't able to find that information in the AU documentation.
Any help &| pointers would be very much appreciated as I'm really
stuck here!!
Thank you
--th
_______________________________________________
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