Resizing Audio Units
- KVRist
- Topic Starter
- 91 posts since 24 Dec, 2015 from Bristol, UK
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!
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
- 7867 posts since 12 Feb, 2006 from Helsinki, Finland
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.
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.
- KVRist
- Topic Starter
- 91 posts since 24 Dec, 2015 from Bristol, UK
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.mystran wrote: ↑Thu Jun 11, 2020 10: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.
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
- 871 posts since 24 Jun, 2002 from Berlin
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
- KVRist
- 243 posts since 24 Aug, 2014
-
- KVRian
- 871 posts since 24 Jun, 2002 from Berlin
- KVRist
- 243 posts since 24 Aug, 2014
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
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.