pipelined / vst2

Build vst2 plugins and hosts with Go
MIT License
135 stars 17 forks source link

Building plugins #35

Closed dudk closed 3 years ago

dudk commented 3 years ago

In theory this package should allow people building VST2 plugins in go. This issue will track the progress in this effort.

Compilation and build:

Build command (OS X):

dudk commented 3 years ago

Managed to build plugin, but hitting this problem with loading plugin built with c-shared in go VST host.

dudk commented 3 years ago

Current branch builds Mach DYLIB. OS X expects VST plugins to be Mach BUNDLE. Looking for a solution.

emicklei commented 3 years ago

Maybe this helps, https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm

dudk commented 3 years ago

@emicklei unfortunately I'm not that strong with C ecosystem. I tried running clang -bundle command with both .a and .dylib files as input, but it gives just an empty bundle in return. I think that in general it expects some C/C++ files referencing that library as input.

It seems like CMake allows to build Mach-O bundle for provided .dylib, but I have no idea where to start as I never used cmake before.

emicklei commented 3 years ago

Same here, C ecosystem is scaring me. Maybe it is time for me to change that but is not just C, also Apple, cgo, cpp,....

In the meantime, I appreciate your effort.

dudk commented 3 years ago

Positive news @emicklei I tried another host (Renoise) and it opened plugin, rendered param value and didn't crash! It seems that Ableton has some check for Mach-O bundle. I'll make a separate task to fix that in the future.

It seems that Rust VST2 plugins built in this library are also just plain dylibs put into bundle folder structure.

Intermediate progress: it's possible to build vst2 effects in go now. There is still a lot of work to do:

dudk commented 3 years ago

I split efforts for supporting plugins into separate issues. I also created v0.10.0 milestone to identify what's a must for first release. Closing this.