VST hosting editor glitches,

Hi Guys,

I’m trying to track down some issues I am seeing hosting certain VST plugins in Juce.

For instance all UAD VST plugins are drawing incorrectly, I have included an image from the AudioPluginHost showing a VST on the left and a correct AU on the right,

With the AU you can see the “menu bar” is at the bottom where it should be, the VST has got it drawn at the top which is wrong.

Has anyone seen anything like this before.

Just tested this in Waveform 12 and it is doing the same thing.

So with a bit more investigation:

Here is the “menu bar” :

So this looks like a juce issue to me rather than a UAD issue?

OK, got them to display properly by changing in struct FlippedNSView : public ObjCClass<NSView>:

        static BOOL isFlipped (id, SEL) { return NO; }

This is obviously not the final solution but why is the plugin view using this flipped class?

Hi @reuk

Hope you are fine.

This is the commit where the old AutoResizingNSViewComponentWithParent was replaced with NSViewComponentWithParent : AutoResizingNSViewComponent: Fix display issues for certain plugin v… · juce-framework/JUCE@0f69066 · GitHub

What was the reasoning behind the flipped view?

I’m guessing it was done for a good reason!

Im also guessing this VST Hosting - Some vsts not displaying may also be related.

Unfortunately I don’t remember exactly why I added that. I think I’d recently discovered isFlipped, and was applying it in a few places to keep the JUCE coordinate space consistent with the platform coordinate space. However, given that the plugin views are ‘native’ rather than being JUCE components, they’ll expect a native coordinate space, so flipping this view is probably a bug. I remember trying a lot of different approaches to get editors displaying consistently, so it’s likely this is something I added as a test, but forgot to remove.

The linked commit message mentions a few different plugins that were fixed by the change. All of those plugins continue to work when disabling the isFlipped function, so I think it’s probably safe to remove. I can also confirm that removing the function fixes the layout problem in UAD VSTs.

A fire for this is now on develop:

Hi @reuk,

Copied into my fork and tested, all good.

Thanks

Andy