the demo auv3 plugin doesn’t resize correctly in logic and garageband. i believe this is a juce bug - apple’s sample auv3 does not have this problem. see this video for an example of both side-by-side in logic.
i found mention of this in a thread on another forum and the suggestion there was that this code is responsible for the (working) resizing in the apple demo code:
I’ve tested this with the demo project on Catalina 10.15.7 with Logic 10.6.1.
When “AUv3 Mode” is enabled in the plugin manager, resizing does not work for the demo project:
However, disabling AUv3 mode (so that the plugin runs in-process) does allow resizing to work as expected in the demo.
At the moment, I think this is likely to be a bug with Logic’s handling of plugins hosted out-of-process. Is anyone aware of an AUv3 plugin which resizes successfully in Logic when running out-of-process (i.e. with AUv3 Mode enabled), which would disprove this theory?
I’ve spent some time debugging this. There seem to be several issues with AUv3 resizing, only one of which we can work around in JUCE:
JUCE plugins were not responding to host-initiated resize requests. I have a fix for this, which I’ll push once it’s been reviewed. Unfortunately, this only seems to work on Big Sur. On Catalina, I can’t get host-initiated resize to work for JUCE plugins or for Apple’s AUv3 Filter Demo. Given that Apple’s demo is broken, I think this is likely a platform issue.
Client-initiated resize (e.g. from a corner resizer or dropdown inside the plugin) doesn’t work for JUCE AUv3 plugins. So far, I haven’t been able to find any AUv3 plugin that can be resized from within the plugin itself. I also haven’t been able to find any documentation that would suggest client-initiated resize is possible. If you know of a plugin where this works, please let me know. At the moment, I think this may not be supported by the plugin format.
Logic’s handling of AUv3 resizing seems to be a bit broken:
If the AUv3 reports that it doesn’t support any of the view configurations that Logic requests, the plugin window will initially be sized to the view controller’s preferredContentSize. If the view is then resized, closed, and reopened, the editor will not reopen at its previous size. Repeatedly closing and opening the window will cause the editor to grow/shrink exponentially. I can reproduce this issue in the AUv3 demo, if I modify it to support none of the requested view configurations. This appears to be a Logic bug.
If the AUv3 reports that it does support one or more of the requested view configurations, Logic will pick one of those view configurations rather than using the preferredContentSize provided by the view controller. As a result, the view may not respect the aspect ratio set in the plugin editor’s constrainer. This does prevent the issue with the editor growing/shrinking on open, though. Again, this behaviour is consistent with the AUv3 demo.
The least-broken setup at the moment seems to be:
Avoid allowing the user to resize the plugin view from within the editor. Disable corner resizers etc. if running as an AUv3. Rely on the host to provide resizing capabilities.
Attempt to support at least one of the view configurations that Logic requests, in order to avoid the exponential-resize bug. Logic 10.6.1 requests 1024x768 and 1366x1024.
Hopefully that helps.
This patch fixes host-initiated resize for AUv3 plugins on macOS:
hey @reuk , sorry to bump this thread again. i’m curious if there’s a way to enforce minimum sizes on auv3 editor windows? resizing is definitely working the way i’d expect (eg, i resize logic’s window, logic resizes my plugin window accordingly) but i’m able to reduce my plugin’s window size to something ridiculously small. i noticed some logic plugins seem to have a singular concept of size while others allow resizing…
If I use GarageBand I see a similar problem as you describe, however if I use Ableton (11.2 beta) it shows the plugin correct. Same is true for all AUv3s I have installed, so it seems this is a problem of GarageBand (and probably Logic too then). If you want to check it in Ableton just be aware if an Auv3 and AUv2 version is installed it will open the AUv2, so you should uninstall the AUv2 version before testing the AUv3.