Revisiting VST 3

This is all great news! Is it the case that VST3 is not as duff as most developers seem to suggest?

@brad (and others) - do you know of any VST3 plugins that take midi in and that generate midi out? VST3 (at least the original spec) did not allow that, and development tools like Juce (currently) do not support it. So Iā€™m wondering to what extent Cantabile will support it. I have such plugins but since Juce does not support mini/in out for VST3 thereā€™s little point I guess in trying these? But FWIW @brad, if interested I can shove you a VST3 version of my plugins to test if you want; Iā€™m going to guess Cantabile will not see midi in on 'em (and possibly not even midi out)ā€¦ but if you wanna give them a shot we can do that.

Or, alternatively, if you want to give me access to a development build Iā€™m happy to test that for you myself!

Itā€™s not greatā€¦ but I canā€™t even really put my finger on exactly why. It guess it just feels complex.

Not off hand. This is vague topic according to VST 3 spec. Thereā€™s this post which suggests itā€™s partially possible. Currently Cantabile will provide an output events object to the plugin and will read out any supplied events and forward them as MIDI events to the plugins MIDI output port. However, for VST 3 itā€™s somewhat limited in that it will only handle kDataEvent, kNoteOnEvent, kNoteOffEvent and kPolyPressureEvent.

The other thing in this area is MIDI effect plugins (as documented in the VST Module Architecture SDK) which Iā€™m not supported at all at the moment.

Sure. Contact me via email.

Happy to do that, but currently donā€™t have anything in a buildable state :frowning:

Brad

Unfortunately this parameter work is requiring some fairly far reaching changes.

Because parameters now need to be referenced by id, and the plugin can use arbitrary 32-bit values for ids, and because Cantabile needs some of that 32-bit space for itā€™s own parameters, thereā€™s the possibility for clashes. So Iā€™m currently in the process of updating various places that reference parameter idā€™s to use 64-bit values and this requires changes that spread through state management and bindings and as well as some other areas.

Also, VST 3 plugins support double precision (64-bit) parameters. VST 2 only supports single precision (32-bit parameters) so Iā€™m making changes to facilitate that at the same time.

Thereā€™s a lot of changes here but theyā€™re mostly simple (just changing types), Iā€™m pretty sure they donā€™t affect saved songs/racks. Also Iā€™m cleaning up and simplifying some of the internal APIā€™s as I go.

First build to include all this will be very experimental. :slight_smile:

Anyway, I hope to have things building by tomorrow. (fingers crossed).

5 Likes

Todayā€™s update: everything is building again, parameters seem to be working though I still havenā€™t found a plugin that actually changes its parameter set at run-time. I might have to write a plugin just to test some of this stuff.

The rest of today was spent testing with some other plugins, trying to track down various issues, emailing plugin developers that seem to be going against the VST3 specs and posting to the VST developer forums to get clarifications on these issues.

Ugh, not fun.

6 Likes

Hi, Brad

Sounds like good progress. I know it can not be much fun making such a major change, but I think Cantabile will be so much the better for this update, and it would be good to rationalise my plugins to just VST3 installs where supported.

If itā€™s any consolation, Iā€™m currently battling writing an x.factory Java librarian for my Roland FC300 MIDI foot controller (before I start one for the Yamaha Montage) and its really esoteric MIDI implementation, which is not consistent with the SYSEX specs that I managed to wheedle out of Roland (but with no support on offer)! On the plus side, it is now basically working. On the negative side, I have discovered that the Roland FC300 does not dump everything you program, which is a major problem. So I am busy writing a bug report to Roland.

Ah, the joys of programmingā€¦ :slight_smile:

1 Like

Thanks @Derek

Java, Roland, inconsistent specs and faulty MIDI implementations - sounds like an all in one insanity pack :slight_smile:

1 Like

Sigh. Another day of debuggingā€¦ not much progress.

Also, seems quite a few VST 3 plugins are built with Juce and I have some questions about how it works. So today spent some time getting open source plugin Helm building so I can now debug through both the host and plugin sides of the code.

Side effect: I noticed this plugin has the same display issues as a couple of others where in per-window resolution mode the display only occupies a quarter of the display area. So maybe I can finally figure out whatā€™s going on with these plugins and get it sorted.

4 Likes

Juce is probably THE audio development framework at the moment. @brad if you have questions about how Juce does VST3, their forum has a bunch of really helpful folks. I strongly suggest you post your questions there! https://forum.juce.com

1 Like

It does have that effect on you! :sweat:

Java is the easy part (been using it for 20 years now and it does live up to its cross platform promise). The big remaining issue for me right now, is that the FC300 allows you to program up to six CC MIDI messages for both of its two expression pedals, and in some songs of mine I have two CCs programmed on a pedal, but the FC300 only dumps the first one for each pedal. Which means that all the backup dumps I have been taking over the years as a backup would never fully restore the pedal if I needed it (which is usually ten minutes before a gig!)

Previously, that would have been a major drag, but right now, I am not to fussed about it (but will report the issue to Roland). Why? Because I will essentially drop down to a single CC per pedal within the FC300 and and I can always generate the extra needed CCs within Cantabile. :slight_smile:

2 Likes

Oh nice. And itā€™s discourse based forum too, even better. Yep, Iā€™ll definitely post some questions there if I get stuck.

For anyone whoā€™s interested in the gory details. This is the kind of detail Iā€™m trying to figure outā€¦ plus how to deal with plugins that break the rules.

4 Likes

I spent today fixing the display issue with Juce based plugins when Cantabile is in HiDPI mode. Hereā€™s a discussion about it on the Juce forum. This fixes a bunch of Arturia plugins (since they use Juce) and probably plugins from other devs too. That oneā€™s been bugging me for a while so pleased to have figured it out. Fix will be in the next build - probably next week.

Also, while I was at it, some of you might remember there was an issue with Addictive Keys/Drums where the UI wasnā€™t drawing correctly. I found a work around at the time, but I spent a couple more hours on it today and finally got to the bottom of what was really going on - it was a problem posting timer messages between threads. You might find the UI in those plugins a bit smoother now since itā€™ll be running on a higher-resolution timer like they intended.

I hoped to get a bit further with the VST 3 stuff this week, but still happy with progress made. Itā€™s Friday night here in Sydney now - I need a drink.

Brad

14 Likes

Fantastic news on the juce stuff. I bought a keylab88, and have been sad I couldnā€™t use the software that came with it. Thanks a ton for getting to this one. Thousands of new sounds now available to me.

-kb

@kirk : out of curiosity, what issues did/do you have with the Arturia software that came with your Keylab88. Iā€™ve been using things like Piano V and Analog lab in Cantabile - both without any issues reallyā€¦

Only when using 4k display. Check out the link Brad posted for a full description. The plugin interface for all Arturia vsts is shown undersized in a portion of the window, which is obviously wrong. What makes is unusable is that the mouse interface is actually at full size, so the visual interface and mouse interested donā€™t match. I had believe it was an opengl problem, but maybe @brad has found a solution.

Problem only seems to be in c3 though, so Iā€™m hoping. As of latest experimental build tonight, still broken.

Ok, makes sense, I donā€™t do 4k :slight_smile:

Yep this was only an issue when running at non-standard DPI scaling.

I described the problem in some detail at the above link to the Juce forum. In short Juceā€™s rendering thread was running in a different DPI awareness context to the UI thread resulting in an incorrectly scaled viewport. The fix I added to Cantabile hooks thread creation and inserts a small stub function that sets up the correct DPI context.

It also happens in Juceā€™s Audio Plugin Host. Basically it happens in any DPI aware host that doesnā€™t take measures to work around it. Iā€™m hoping Juce devs will add a fix too.

Just downloaded 3609, and shazam! Arturia plugins scale perfectly. Well done and thank you.

1 Like

Very grateful for all the work, and for the communication, Brad.

1 Like