obiwanjacobi / vst.net

Virtual Studio Technology (VST) for .NET. Plugins and Host applications.
https://obiwanjacobi.github.io/vst.net/index.html
GNU Lesser General Public License v2.1
420 stars 52 forks source link

How Jacobi.Vst.Host.Interop cancels its dependence on `WinForm`? #52

Closed albyho closed 2 years ago

albyho commented 2 years ago

It is not convenient to create an ASP.NET core app at the moment.

obiwanjacobi commented 2 years ago

I am curious about your use case. Why would you want to?

albyho commented 2 years ago

I want to create a web-based Vst host.

obiwanjacobi commented 2 years ago

How are you going to 'remote' the plugin native UIs? Almost all plugins I know have a (windows) GUI. I don't think that translate well to the web...

albyho commented 2 years ago
  1. Prepare some *.fxb files on the website.
  2. Users upload *.midi files for synthesize music.
Becks723 commented 2 years ago

@albyho You can build your custom version. To remove the dependency of Winforms, just remove the FrameworkReference of Winforms in Host.Interop's project file.

https://github.com/obiwanjacobi/vst.net/blob/73b8640fefc11d44e9d59b631918cfaba13beb09/Source/Code/Jacobi.Vst.Interop/Jacobi.Vst.Host.Interop.vcxproj#L296

Also you may have to remove the codes which is Winforms-specific. I've tried, there're only two MessageBox functions. Not very necessary I think.

Finally just rebuild the solution.

(想不到这儿能遇到老乡~)

albyho commented 2 years ago

@Becks723 Yes. But some VST(i) plugins need to be initialized on the main thread. It's not vst.net's problem. Not WinForm, too. (老乡好。微信或QQ交流下?微信:Alby-Ho)