Resizing Audio Units

DSP, Plug-in and Host development discussion.
KVRist
72 posts since 24 Dec, 2015 from Bristol, UK

Post Thu Jun 11, 2020 11:30 am

Do any hosts automatically resize audio units?

If I load a VST3 into Reaper, when I resize the plugin host window it calls the IPlugView::onSize as I would expect. If I load an Audio Unit into Reaper it doesn't seem to resize the NSView returned from uiViewForAudioUnit. If the plugin itself changes the size of the NSView for an Audio Unit then the host responds, so that bit is fine.

Also in Logic Pro I can't drag the border of a window to resize the plugin, again maybe there is no way round this.

Just wondering if this stuff is possible?

It seems a bit of a workaround to resort to putting a resize grip or some other mechanism inside the plugin to do what desktops are good at anyways!

KVRAF
6323 posts since 12 Feb, 2006 from Helsinki, Finland

Post Thu Jun 11, 2020 2:52 pm

I'm pretty sure the only way to even tell an AU host what size you want is to just resize the NSView.

I feel like this might be an IPlug issue, because I've honestly never noticed any problem just computing the desired size of the editor myself and handing the NSView to the host.
Preferred pronouns would be "it/it" because according to this country, I'm a piece of human trash.

KVRist

Topic Starter

72 posts since 24 Dec, 2015 from Bristol, UK

Post Fri Jun 12, 2020 9:42 am

mystran wrote:
Thu Jun 11, 2020 2:52 pm
I'm pretty sure the only way to even tell an AU host what size you want is to just resize the NSView.

I feel like this might be an IPlug issue, because I've honestly never noticed any problem just computing the desired size of the editor myself and handing the NSView to the host.
Yes I agree wholeheartedly with that. I'm taking that approach when the plugin knows it wants to resize. What I don't know is whether when the user resizes the plugin window (i.e. by dragging on the window border) whether there's any way to let the host know it's ok to resize the NSView.

This happens in VST3 by the host calling into the plugin's implementation of the VST3 interface Steinberg::IPlugView::onSize - not part of IPlug, although it's pretty confusing without the namespace :-)

i.e. when the user resizes Reaper's plugin window, Reaper will tell my VST3 to resize, but I'm not sure how that works for Audio Units?

KVRian
845 posts since 24 Jun, 2002 from Berlin

Post Sun Jun 14, 2020 2:25 am

I’ve seen some audio units that are resizeable in logic X via the window chrome, but I haven’t yet worked out how to enable that. I expected some setting on the Plugin’s NSView

User avatar
KVRist
223 posts since 24 Aug, 2014 from Moscow

Post Sun Jun 14, 2020 11:28 am

hibrasil wrote:
Sun Jun 14, 2020 2:25 am
I’ve seen some audio units that are resizeable in logic X via the window chrome
Are they resizable via the top of the window where logic toolbar is? If no, it is probably an emulation, not native resize.

KVRian
845 posts since 24 Jun, 2002 from Berlin

Post Sun Jun 14, 2020 11:43 am


User avatar
KVRist
223 posts since 24 Aug, 2014 from Moscow

Post Mon Jun 15, 2020 2:27 am

For AUv3 there is supportedViewConfigurations method. Additionally, AUv3 example from Apple uses NSLayoutConstraint.activate to add size constrains to view. Not sure which one does the trick.

KVRer
23 posts since 18 May, 2005

Post Wed Feb 10, 2021 7:25 pm

hibrasil wrote:
Sun Jun 14, 2020 2:25 am
I’ve seen some audio units that are resizeable in logic X via the window chrome, but I haven’t yet worked out how to enable that. I expected some setting on the Plugin’s NSView
Did you also see non AUv3 plugins with this feature? I'm also interested in knowing how to tell Logic that my plugin view is resizable without using AUv3.

Return to “DSP and Plug-in Development”