Hello, I have a very odd bug on my VST3 plug-in only on Mac Cubase. - It continuously resizes itself bigger and bigger until it hits the limit I set. And then I cannot set it’s size when I try to move the corner tab.
- This does not do happen when I don’t set the aspect ratio.
- This appears to ONLY be on MAC with Cubase LE Elements 9. The latest Reaper is OK, and also every appears to be OK on Windows. Although I haven’t got a lot of software to test it on.
- It doesn’t matter what I set the initial size to be.
- AAX & VST2 & AU are working fine. This is just the VST3.
This is the top of my Editor constructor…‘background’ is the back image that happens to be 1024x712 in size.
sizeRatio = (float)backgroundSize.getX() / (float)(backgroundSize.getY());
setResizeLimits(backgroundSize.getX()/2, backgroundSize.getY()/2, backgroundSize.getX(), backgroundSize.getY());
// Set initial size to some factor of the maximum size...
// Bottom of constructor....
setSize((backgroundSize.getX() * 2) / 3, (((backgroundSize.getY()) * 2 / 3));
The Juce demo ‘AudioPluginDemo’ has the same problem IF I set in the editor constructor:
getConstrainer()->setFixedAspectRatio(1.0); // Or whatever number
Things are a little different today, it seems I can enlarge the plug-in but not shrink it(!) which is something, although I save the current size so the user won’t be able to use the smaller size without re-instantiating the plug.
This is using Juce 5.3.2 & the default SDK & target
edit I’m trying to take VST 3 seriously, but…
Can someone test the demo? I get the feeling Juce thinks this is fixed already, but it’s not AFIK in Cubase, anyway.
This commit should fix things.
Thank-you, I will try it now.
Works OK after I deleted the line:
#define JUCE_VST3_CAN_REPLACE_VST2 1
Otherwise I get a bunch of errors. I guess I need the whole code to carry on with that.
EDIT looking closer it seems I don’t have the include file, “vstfxstore.h”
I can resize the plug-in OK now, although it does sometimes leave a thick black border around one edge of the plug-in - I can live with that though.
I just got the whole commit. Everything seems fine. Black border still there if I resize using a corner, but it’s cool that I can use the edges AND use the corner tab now.
Aah, unfortunately that commit also trashes VST 2 scaling and it can’t even resize the background properly or display the corner tab. Example fresh project called Test1. The only addition being…
Test1AudioProcessorEditor::Test1AudioProcessorEditor (Test1AudioProcessor& p)
: AudioProcessorEditor (&p), processor §
// Make sure that before the constructor has finished, you’ve set the
// editor’s size to whatever you need it to be.
setSize (400, 400);
setResizeLimits(256, 256, 2048, 2048);
I can’t see how that would be the case as the commit only modified the VST3 bounds constraining; I can’t reproduce it in Elements 9 either. Are you sure you haven’t modified anything else?
Thanks for looking at it. hmm I got the commit by downloading the zip file. I got the whole thing and copied it over the Juce folder stuff to match it file to file.
That sounds like a recipe for file mismatches and errors like the ones you’re seeing! If you’re not already using some sort of version control to manage your JUCE repo, I’d highly recommend it. That way you can just pull the latest tip of the develop branch and also make sure you don’t have any local changes to the JUCE repo which may be interfering.
OK I just deleted my JUCE folder to be sure, and got the ‘develop’ commit, and it appears to be fixed, thanks! I don’t know github but I suppose it’s time to learn it now.
When will that fix be in the ‘master’ commit? Do you have anyway of knowing?
With all respect DaveH, but you are an Indie developer without Git knowledge?
Please spend a few days investigating it - this will save you lots of time in the future!
I’ll cherry-pick the commit to the master branch after a couple of days if there are no issues. Definitely take some time to learn git, it’ll save you a lot of hours of head-scratching in the long run!
I’ve used version control for years, but only as part of a team of developers. Not on my own though, and certainly not with GIT, I can’t remember what we used TBH!