osxmidi / LinVst3

Linux Windows vst3 wrapper/bridge
GNU General Public License v3.0
89 stars 7 forks source link

Opening linvst3.so plugin fails because function ModuleEntry is missing #19

Closed jennisms closed 1 year ago

jennisms commented 1 year ago

I'm trying to use LinVst3 to run Windows VST3 plugins in a custom Linux application. However VST3::Hosting::Module::create() fails to open the (properly renamed) linvst3.so because the load routine in VST_SDK/vst3sdk/public.sdk/source/vst/hosting/module_linux.cpp does not find the mandatory ModuleEntry function. For some reason I did not find ModuleEntry in the whole LinVst3 project.

Since I also needed to create a special folder structure for the binaries to be found (PluginName/Contents/x86_64-linux/) which seems not to be documented, I'm wondering if I miss something fundamental.

Your help in the matter will be much appreciated.

osxmidi commented 1 year ago

I'm trying to use LinVst3 to run Windows VST3 plugins in a custom Linux application. However VST3::Hosting::Module::create() fails to open the (properly renamed) linvst3.so because the load routine in _VST_SDK/vst3sdk/public.sdk/source/vst/hosting/modulelinux.cpp does not find the mandatory ModuleEntry function. For some reason I did not find ModuleEntry in the whole LinVst3 project.

Since I also needed to create a special folder structure for the binaries to be found (_PluginName/Contents/x8664-linux/) which seems not to be documented, I'm wondering if I miss something fundamental.

Your help in the matter will be much appreciated.

From memory the ModuleEntry is in the windows part, lin-vst3-servertrack.exe

jennisms commented 1 year ago

Thanks for your answer. I still don't get the picture. In my understanding lin-vst3-servertrack.exe runs the Windows plugin. linvst3.so acts as the plugin for the Linux DAW and handles communication and data transfer to and from the Windows plugin. But to act as an operational Linux VST3 plugin it should have the methods ModuleEntry, ModuleExit, and GetPluginFactory? Or which methods do I need to call from my Linux DAW?

osxmidi commented 1 year ago

Thanks for your answer. I still don't get the picture. In my understanding lin-vst3-servertrack.exe runs the Windows plugin. linvst3.so acts as the plugin for the Linux DAW and handles communication and data transfer to and from the Windows plugin. But to act as an operational Linux VST3 plugin it should have the methods ModuleEntry, ModuleExit, and GetPluginFactory? Or which methods do I need to call from my Linux DAW?

I see what the problem is now.

linvst3.so is a vst2 file and i get loaded by the daw as a vst2 plugin and that sends and receives data from the vst3 server lin-vst3-servertrack.exe, so linvst3.so being a vst2 file means it does not have a vst3 ModuleEntry.

jennisms commented 1 year ago

Ok, yes, that explains it. Thank you. Do you know a similar project which provides a VST3 interface on Linux side? I'm not (yet) very familiar with the VST2 and VST3 interfaces. Do you see fundamental obstacles to implement a VST3 only wrapper?

jennisms commented 1 year ago

After some source code reading my understanding is that the VST3 to VST2 conversion stuff is mainly done by a Steinberg helper class (Steinberg::Vst::Vst2Wrapper) in the Windows server part and all communication between Linux plugin and Windows server is still VST2 based. Thus, switching to VST3 would probably require to re-implement large parts.

osxmidi commented 1 year ago

After some source code reading my understanding is that the VST3 to VST2 conversion stuff is mainly done by a Steinberg helper class (Steinberg::Vst::Vst2Wrapper) in the Windows server part and all communication between Linux plugin and Windows server is still VST2 based. Thus, switching to VST3 would probably require to re-implement large parts.

LinVst3 loads the vst3 and then things like the parameters and audio etc get translated to vst2 equivalents using vst3 functions.

LinVst3 doesn't make the vst3 plugin a vst2 plugin, the vst3 plugin is just presented to the Linux daw as a vst2 interface.

There are some things that can't be translated to vst2 equivalents such as Context Menus.

I did LinVst3 when some Linux daws did not support vst3.

I could make a vst3 version but it's not worth it as far as I'm concerned because there aren't that many benefits.

Another reason is speed and latency.

Vst2 is not that bad to implement in a Linux to Wine and Wine to Linux way but it depends on a few things and LinVst and LinVst3 use futexes to transfer data between them.

It's not that easy implementing some vst3 features such as per sample automation etc because it becomes a lot of data that needs to be transferred from the Linux to Wine or Wine to Linux sides and speed comes into it.

jennisms commented 1 year ago

That makes sense to me. Thanks for you explanations.