AU automation problem

Hi, I was checking the demo filter plugin on Mac and host automation
does not seem to work for the AU version of the plugin. The vst version was working ok. I tested with PPC Mac OSX Tiger, Logic 7 and Live 6.


Really? I’ve tried automation in Logic and am sure it worked… Are you using the basic juce demo?

Yes (demojuceaudiounit.component), I am moving the gain slider but it does not record the changes.(ex. using Logic touch)

Right. I’ve spent nearly two days looking at this and have to admit I’m completely stumped.

There was a mistake in my code - I should have been sending a notification to say a parameter has changed. All the AU samples and documentation do it like this:

[code] void informHostOfParameterChange (int index, float newValue)
if (juceFilter != 0)
juceFilter->setParameter (index, newValue);

        if (AUEventListenerNotify != 0)
            AudioUnitEvent e;
            e.mEventType = kAudioUnitEvent_ParameterValueChange;
            e.mArgument.mParameter.mAudioUnit = GetComponentInstance();
            e.mArgument.mParameter.mParameterID = (AudioUnitParameterID) index;
            e.mArgument.mParameter.mScope = kAudioUnitScope_Global;
            e.mArgument.mParameter.mElement = 0;
            AUEventListenerNotify (0, 0, &e);


…so I altered my method as above, but it still doesn’t work. Logic just either doesn’t get the message or ignores it.

I’m baffled, I’ve gone through every bit of my code and the demo code looking for differences, but can’t find anything that might affect this. They also have a concept of begin/end messages to say when you’re about to start changing a param, so I tried using those as well, but this made no difference at all.

Any suggestions welcome, as I’m really out of ideas on this one!

Hi Jules,

I have tested your changes on my new Intel Mac and the parameter automation is working for Live 6.

I will do some more testing on PPC Mac and Logic and let you know.


Hi Jules,

I have tested Live 6 on PPC and automation works as well (with the changes you have made), Logic though is not working.
It looks as Logic might need some extra events??


That’s interesting - although I’ve no idea at all what extra events we could try! I spent a long time searching for examples/docs but didn’t come up with any other clues at all…

Hi Jules,

I found the following information specific to Logic Automation.
I hope that this helps.


For plug-in parameter automation in combination with custom interfaces, it is essential that Audio
Unit plug-ins send the events ‘kAudioUnitCarbonViewEvent_MouseDownInControl’ and
‘kAudioUnitCarbonViewEvent_MouseUpInControl’ and use the parameter listener scheme to inform
the host of parameter changes.

Hmm. I’m pretty sure I tried that one, but it’s worth another go, I guess!

I’m busy today, but if you want to try it, the quickest way is just to send the down/up events before and after the code snippet above.

Thanks Jules

Hi guys, I investigated some month ago around this problem of notifying au parameters automation to the host. It is not easy as for VST, a little more complicated.

This is the starting point:

Yeah, that’s the webpage that I was working from, but using the code that’s there doesn’t seem to work in Logic (but it does work in Live…)


I have tried sending the following events


but still Logic automation does not work. I am quite new on Mac and AU
(I first set my hands on a Mac four months ago) so I do not know if I
do things the correct way. Any AU experts help?

From the Apple filter example I see a lot of work with properties; what is the relation between properties and parameters?


Yeah, I tried all those events too, and it made no difference at all. No idea what’s going on there.

Parameters are numeric and can be changed by the host; properties are just places to store other kinds of data.

Hi Jules,

I have tried some other things like setting the jucedemo to be an
effect aufx, set JucePlugin_EditorRequiresKeyboardFocus = 0, and used the au validation tool for both setups as fx or synth (validates ok) but still
not working in Logic.

From your site it seems that companies like korg, m-audio etc are using
juce for commercial products as us; is it possible to ask help from them how they handle this problem?

The parameters were not available in the logic automation menu, this code fixes the problem. Must have been something with the CFString that didn’t allow logic to display it.

ComponentResult GetParameterInfo (AudioUnitScope inScope,
AudioUnitParameterID inParameterID,
AudioUnitParameterInfo& outParameterInfo)
if (inScope == kAudioUnitScope_Global && juceFilter != 0)
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
| kAudioUnitParameterFlag_IsReadable ;

    AUBase::FillInParameterName (outParameterInfo, 
        PlatformUtilities::juceStringToCFString (juceFilter->getParameterName ((int) inParameterID)),
        false ) ;

    outParameterInfo.minValue     = 0.0f;
    outParameterInfo.maxValue     =1.0f;
    outParameterInfo.defaultValue = 0.0f;
    outParameterInfo.unit         = kAudioUnitParameterUnit_Generic;

    return noErr;
    return kAudioUnitErr_InvalidParameter;


Thanks - though I’d already checked-in a fix for this if you grab the tip of the source tree. I didn’t know about that FillInParameterName call though, I might change it to use that instead.

Hi Jules,Kenneth
I tried the code supplied by Kenneth by replacing the GetParameterInfo function in the AUwrapper but still no automation in Logic. I am using juce 1.43, should I recompile with 1.44 for the code to work?
Jules is your fix in 1.44 release?


I am compiling against the 1.44.
None of the parameters were being displayed in the logic automation menu for the plugin until I put my patch. I assume that taking from the head will also fix it as Jules said.

Hey Jules, how about upgrading me from a Weenie? :slight_smile:

I’m afraid that’s out of my hands… You’re at the mercy of the phpbb server to give out promotions!