-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VST3 Linux Inconsistently Working #514
Comments
Hey OK that @asimilon document is right; we need to package it up like a mac bundle. When I do that I can get bitwig to recognize a VST3 then crash when it loads the plugin. But that's OK. Basically we can make a post-build script to build the .vst bundle. |
VST3 on Linux requires a mac-like bundle, as described in the VST3 documentation vst3sdk/doc/vstinterfaces/vst3loc.html. These changes move VST3 from a raw dll to a bundle using the same techniques we use on macOS. Since we bake the images and so on into the bundle, the bundle contains only the DLL. With this change, bitwig studio will load our VST3, but it crashes if you open the UI and gives corrupted parameter names. But we are able to begin to debug. Addresses part of surge-synthesizer#514
VST3 on Linux requires a mac-like bundle, as described in the VST3 documentation vst3sdk/doc/vstinterfaces/vst3loc.html. These changes move VST3 from a raw dll to a bundle using the same techniques we use on macOS. Since we bake the images and so on into the bundle, the bundle contains only the DLL. With this change, bitwig studio will load our VST3, but it crashes if you open the UI and gives corrupted parameter names. But we are able to begin to debug. Addresses part of #514
OK great so if you build the steinberg editor host it can also load the .vst3 and gets a core dump in (of all places) xcb_generate_id from VSTGUI::ChildWindow. So clearly something amiss but also clearly our VST3 is now starting to work. If you want to try this here's a set of commands
and you'll get the loading starting, a window almost popping up, and this core trace:
|
OK I just spent a bit of time debugging this. There's two basic problems 1: The runloop handling in VST3 on Linux is all done by having the processor vs editor split which we didn't do
The stack above happens because the runloop isn't initialized. You can fix that by making a runloop object and passing it down to the frame constructor in SurgeGUIEditor like they do in vst3editor.cpp but nothing actually runs that loop them. So the trick @falkTX played with the aeff editor forcing loop for VST2 needs to happen here, but it needs to happen in conjunction with us embracing the VST3 editor/processor split as described in #164 |
Basically: @falkTX do you know how to hang a runloop in which repaints on vst3 like you did on vst2? If you can point at an example of that it would be lovely. |
I know almost nothing about vst3, cant help much here sorry. At some point later, after initial linux release, I will do a DPF build (like vst2, vst3, etc but for DPF) which allows us to have fully-working standalone (via JACK), LV2 and legal vst2 (no more steinberg vstsdk). |
Ok thanks ! Look forward to the dpf build. |
Perhaps relevant : https://forum.juce.com/t/vst3-support-on-linux/31872/2 |
Thank you yeah that matches what I found exactly. Glad to know I’m not nuts. But also the vst3sdk contains a runloop for the editor which configures itself pretty well but only if you have the editor / processor split. Since we don’t have that split, we need to c-n-p that editor runloop across (or somehow grossly double inherit or something). |
Connect with #747 |
VST3 on Linux requires a mac-like bundle, as described in the VST3 documentation vst3sdk/doc/vstinterfaces/vst3loc.html. These changes move VST3 from a raw dll to a bundle using the same techniques we use on macOS. Since we bake the images and so on into the bundle, the bundle contains only the DLL. With this change, bitwig studio will load our VST3, but it crashes if you open the UI and gives corrupted parameter names. But we are able to begin to debug. Addresses part of surge-synthesizer#514 Former-commit-id: 2f4e1b3d64624c7b9c046af41ad004986be98b49 [formerly 47fe976] Former-commit-id: 19718ab93becd95200eac7b81fcaa914c6fa8883 Former-commit-id: 96557f18f5c1814dbde4dcab427c909b1fa5cc04
OK so here's some details
where LinuxRunLoop is an implementation of IRunLoop so looks like VST3 could work if
Bumping this to 1.6.2 since I am tired of not having vst3 all platforms. |
Nope. Too hard. |
Cool. Steinberg::Linux::IRunLoop and VSTGUI::X11::IRunLoop One is from the host side and the other is from the plugin sude That's what all that stupid vst3editor code is bridging This stuff is a nightmare, undocumented, and badly designed. I'll checkpoint as close as I got on a branch and then try again some other time. |
This set of changes creates a VST3 which works in the Steinberg Demo edithost but does not work in BitWig quite yet. Addresses surge-synthesizer#514
This set of changes creates a VST3 which works in the Steinberg Demo edithost but does not work in BitWig quite yet. Addresses surge-synthesizer#514
This set of changes creates a VST3 which works in the Steinberg Demo edithost but does not work in BitWig quite yet. Addresses #514
Note to self; The linux vst2 calls idle from the synth idle. I wonder if I should do that rather than spin up a thread in the vst3 equivalent (see where I spin up the thread in the ::start in the vst3 support thing). Just for when I come back to that, saw it in the code and thought of it. |
With this diff, the Limux VST3 works fine in Reaper. Still a crash on exit. Addresses surge-synthesizer#514
With this diff, the Limux VST3 works fine in Reaper. Still a crash on exit. Addresses surge-synthesizer#514
With this diff, the Limux VST3 works fine in Reaper. Still a crash on exit. Addresses #514
The LInux VST3 now cleanly shuts down its runloop, meaning it works completely in reaper linux. I have included it in the deb file for installation as a result. Addresses surge-synthesizer#514
as a reminder, the Surge VST3 loads in Reaper and plays presets |
In bitwig you canauromste parameters and it responds correctly right? |
Can automate that is. Sorry |
Oh that’s super useful I will bang my head against it one more time before we ship 1.6.2. Maybe I can find it. |
Right so debugged some. Here's the difference
Hmm. |
The file descriptor is supposed to activate on Xcb events arriving, which in some particular cases poll() failed to notice. For example under Lv2 idle callback, polling is never working at this call site. But you can get it working in a parallel thread. (which no doubt is somewhat racey, but then it works) I guess something else may be consuming the events before that VSTGUI is able to poll them. |
Just hitting this with some notes to self As @tank-trax points out, in some hosts (Carla it seems) and sometimes in bitwig the menu doesn't work. This is also the case in the JUCE6 AudioPluginHost which is a super useful testbed
and then you can load a surge vst3. I see
|
So after a bunch of work with @tank-trax and many others, I'm now confident that the surge VST3 is basically fine at head in the nightly. One or two glitches here but those are separate issues. So I'm gonna close this |
Just here at the top of the thread
As of sep 2019
The text was updated successfully, but these errors were encountered: