VST3 Tracktion rezize / host state recall problems

opengl
windows
gui

#1

Hi there,

firstly, my apologies if this is not the right place to ask.
I’ve downloaded the recently announced free Tracktion 6.3.1 to check compatibility with our plug-ins,
and encountered the following two problems with the VST3 version:

  1. The host doesn’t give us back correct data in setComponentState() of the VST3 controller, which means the plug-in state fails to be recalled from the host session
  2. The Tracktion plug-in window gets resized correctly when the user changes the editor size in the plug-in, but the child window / graphics canvas doesn’t (stays at initial size).

This behavior happens in Tracktion 6.3.1 (32bit, Windows 10). In latest Juce PluginHost, bug #1 does not manifest itself anymore, while #2 still does. I’m guessing Tracktion uses Juce as its code base, which is why I did this.

I must add that no other major host I’ve tested exhibit these problems, so I’m wondering if T6 might be doing something a little ‘funky’ there. Also, this plug-in is not built with Juce but uses a custom in-house framework.

The affected plug-in in question is there https://www.lmdsp.com/products/superchord/.
Please PM me if you need a private beta, as the currently released version does not have the UI scaling support in it yet.

Thanks,
Lorcan


#2

Regarding the resize bug and after investigation,

the VST3 specs says this (iplugview.h l.95):

Sizing of a view
Plug-in : The Plug-in can call IPlugFrame::resizeView() and cause the host to resize the
window.
Afterwards the host has to call IPlugView::onSize () if a resize is needed (size was changed).
Note that if the host calls IPlugView::getSize () before calling IPlugView::onSize () (if needed),
it will get the current (old) size not the wanted one!!
Here the calling sequence:
* plug-in->host: IPlugFrame::resizeView (newSize)
* host->plug-in (optional): IPlugView::getSize () returns the currentSize (not the wanted
newSize)!
* host->plug-in: if newSize is different than its actual current size: IPlugView::onSize (newSize)
* host->plug-in (optional): IPlugView::getSize () returns the newSize
Please only resize the platform representation of the view when IPlugView::onSize () is called.

Through step debugging I noticed that I never receive WM_SIZE after the editor is open.
I think this is due to componentMovedOrResized() in Juce_VST3PluginFormat.cpp l.1428:

when view->canResize() != kResultTrue (no live resizing), view->onSize (&rect) is not called, and SetWindowPos() is only sent to the top-level host provided window, leading to this (1.5x scale factor):

Cheers,
Lorcan


#3

I think both of these problems have been fixed in recent JUCE versions and so newer tracktion versions should not show this behaviour anymore. Can you confirm?

Unfortunately, one of the many downsides of being a plug-in developer is to deal with the many quirks and bugs of old versions of hosts.


#4

@fabian, thanks for your answer.

I tried out the Waveform demo, and can confirm the VST3 host state recall bug is fixed.
The VST3 resize bug is still there unfortunately, as in Juce’s PluginHost example.

As a plug-in developer I do try to maximize compatibility with most hosts, in order of prevalence, using workarounds as necessary. This is a very time-consuming task … especially when you don’t have the source code of the host, and have to make wild guesses, which might change in the next version too …
Fortunately here I have access to the source.

Here I have a quite strong suspicion that Juce’s VST3 resize handling code is not conforming to the spec, as I detailed in my post. Of course I could put another hack in my code to handle Juce’s specific behavior, but I feel it would benefit all other plug-in devs if there was a fix on the host side.


#5

Yes, of course. I’ll look into this. However, even with a fix, any hosts based on the current JUCE version will have the wrong re-size behaviour so it’s best to still add a workaround to your plug-in.


#6

Yes thanks, I’ve done exactly that.