VST3 resizing issue in Reaper


#1

When we specify a “FixedAspectRatio”, the window is not correctly resized (its ratio is not constrained) and there are some glitches.
this can be reproduced with the JuceDemoPluginAudio with the following added at the end of the JuceDemoPluginAudioProcessorEditor constructor :

if (auto* compBoundsConstrainer = getConstrainer())
    compBoundsConstrainer->setFixedAspectRatio (1.5f);

(it’s working fine with VST2)

edit: I only tested on mac, not on windows


#2

I am also experienced VST3 resizing weirdness in Reaper (64bit, OS X).

In my case I have observed that if either setResizable or setResizeLimits is present in the editor’s constructor, then the width and height defined in setSize are ignored, and the plugin GUI is initially scaled to fill Reaper’s FX window.

Additionally, if setFixedAspectRatio is also present then resizing Reaper’s FX window by dragging its edges will cause the plugin GUI to be resized, which is not the case with VST2 plugins (I believe the plugin should only resize when Juce’s resizable corner component is dragged). The GUI will “jump” around the screen as the FX window is resized, and might even be positioned off screen.

I have observed this behaviour in VST3 versions of commercial Juce plugins by other developers.

Here is example code that will reproduce the problem:

    setResizable(true, true);
    setResizeLimits(600, 400, 1200, 800);
    getConstrainer()->setFixedAspectRatio(1.5);
    setSize (600, 400);

#3

This commit should sort things out - can you see if it fixes the issue for you?


#4

Thank Ed! That commit has stopped the plugin glitching while dragging, for me.

The inital size of the plugin is still incorrect, though. On initial load my VST3 plugin’s GUI fills the entire width of Reaper’s FX window, ignoring the size defined in setSize()


#5

I’ve added the following lines to a default audio plug-in project generated by the Projcuer:

setResizable (true, true);
setResizeLimits (600, 400, 1200, 800);
getConstrainer()->setFixedAspectRatio (1.5);

setSize (600, 400);

but I can’t reproduce the problem - the size of the plug-in window is 600x400 when opening. Is there something else I need to add?


#6

thanks Ed, seems to work fine for me.
I see that the behaviour is a bit different between vst2 and vst3.
I see what jnicol means. with the vst3, the plugin will automatically scale to fill reaper’s window (click on the ‘+’ in the topbar of the window to test that), while with vst2, the window’s size was not impacting the plugin size.
I think I actually prefer the vst3 behaviour.


#7

Hi Ed. I’ve made a video which illustrates what happens when I build a default audio plugin-in with the same code, and add it to Reaper:

If I add the plugin to a new Reaper track (“Insert virtual instrument on new track”) it is the correct size. But if I resize the FX window then the plugin scales up until it reaches the upper limit set with setResizeLimits. Then, if I add a new copy of the plugin to that larger FX window, it is rendered at its maximum size, instead of the size defined in setSize.

What I would expect to happen is that the plugin is always rendered at its default size initially, regardless of the size of the FX window it is added to, and only scales up/down if the user drags its corner resizer (like VST2 plugins).

Hopefully my video helps to illustrate the issue :slight_smile:


#8

That’s odd, I’m not seeing that behaviour - if I do the same and add a new plug-in instance after scaling it to max then it resizes to the correct size when opening. I’m on macOS 10.14.2 and the latest Reaper v5.965.


#9

I’m using the latest Reaper (tested in 32 and 64 bit versions), but I am still rocking OS X 10.12.6, so perhaps that’s the problem.

I will assume that the issue I described is isolated to me, but if I see it crop up on another system I’ll let you know.

Thanks again for fixing the other issue with the plugin positioning!


#10

I have some glitches & resizing ‘bumps’ in Cubase (9.5 on mac) with the VST3 with latest dev tip (can be reproduced the same way as above).