Bugs(?) in GenericAudioProcessorEditor

Hi all,

I recently came across trying to host Kontakt as an AU including automations. Here is a summary of what I found / needed to change. Hope this helps anyone (or maybe gets implemented into the JUCE framework):

Using the slider parameter to attach to a parameter resulted in a strange behaviour that the value label is always a little behind. I fixed it by changing the label update AFTER the call to endChangeGesture(). This had to be done at two places: in sliderValueChanged and add the update to the slider listener when you stop moving it. Thinking about it (and consulting the docs) gives me the feelings that this is how it is supposed to work.

Also the line getParameter().setValueNotifyingHost ((float) slider.getValue()); (381) doesn’t make sense to me. Is that required to use this method as a host? The slider is obviously in the correct position and the label gets updated a few calls later. I changed it to just setValue and it works fine.

Just a bug I found: when you assign a Host Animation in Kontakt, the name of the parameter (or label or what ever) is changed. JUCE continues to display the old original unassigned parameter name. I tried it out in MainStage and it does work there. Maybe I have the time to look into that in a few days, seems like there is an update call missing.

Let me know what you guys think.
Best, Rincewind

The reason why you shouldn’t call setValue() directly is, that the host is in charge if the users change is applied or not. The automation in the host could be set to read, in which case the user gesture has to be discarded.

That’s the reason for the round trip of setValueNotifyingHost() which triggers a setValue() from the host if the actual value has changed.

I don’t know anything about the other issues you mentioned though.

2 Likes

I read your post multiple times but I can’t make any sense of it :sweat_smile:, maybe you could elaborate again were you see the benefit/requirement to call #setValueNotifyingHost() FROM the host application.

After all I came up with my own explanation (not sure if that is what you wanted to say): the one SliderAttachment should not assume it is the only listener for the processor parameter. Calling #setValueNotifyingHost ensures all other listeners also get a piece of the cake.

Thanks for reporting this issue. We’ve updated the AU wrapper and the GenericPluginEditor so that the current parameter name will always be displayed correctly in the AudioPluginHost:

Looks like quite the fix, didn‘t thought it would need that much work! Thanks for taking care of this.