werman / noise-suppression-for-voice

Noise suppression plugin based on Xiph's RNNoise
GNU General Public License v3.0
4.86k stars 230 forks source link

Build instructions or compiled vst download for Mac? #6

Closed ToxMox closed 5 years ago

ToxMox commented 5 years ago

Hi there. I was using this plugin successfully and quite enjoying it on Windows but have moved to a Mac and would love to be able to use it on there. Any chance you'd be willing to give Mac build instructions or a release that includes a Mac VST build?

Thanks!

werman commented 5 years ago

For mac build should not differ from other platforms, so you'd need CMake (https://cmake.org/download/) and you can build everything with:

cmake -Bbuild-x64 -H. -DCMAKE_BUILD_TYPE=Release
cd build-x64
make

in repository directory.

If any issues arise - ask, they probably will...

ToxMox commented 5 years ago

On the 3rd step of make I get the following:

Mac-mini:build-x64 toxmox$ make [ 20%] Linking CXX shared library /vst/librnnoise_vst.dylib clang: warning: argument unused during compilation: '-static-libstdc++' [-Wunused-command-line-argument] ld: library not found for -lRnNoisePluginCommon clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [/vst/librnnoise_vst.dylib] Error 1 make[1]: [CMakeFiles/rnnoise_vst.dir/all] Error 2 make: *** [all] Error 2

ToxMox commented 5 years ago

Side note. I was originally getting this error and edited out -static-libgcc and ran again and got the message above. Mac-mini:build-x64 toxmox$ make -- Configuring done -- Generating done -- Build files have been written to: /Users/toxmox/werman/noise-suppression-for-voice/src/vst_plugin/build-x64 [ 20%] Linking CXX shared library /vst/librnnoise_vst.dylib clang: error: unsupported option '-static-libgcc' make[2]: [/vst/librnnoise_vst.dylib] Error 1 make[1]: [CMakeFiles/rnnoise_vst.dir/all] Error 2 make: *** [all] Error 2

werman commented 5 years ago

Side note. I was originally getting this error and edited out -static-libgcc and ran again and got the message above.

I think it's indeed not needed on Linux or Mac.

ld: library not found for -lRnNoisePluginCommon

That's interesting, what do you have in build-x64/lib/ ?

ToxMox commented 5 years ago

Ok I screwed up the first time so I started over. Copied over the VST 2 SDK files. Edited all the static lib stuff out of everything then ran the commands and everything built. Now the problem I have is the plugin isn't detected by Reaper. I copied the librnnoise_vst.dylib from the build-x64/bin/vst folder into the folder where VST 2 files go then rescanned the plugins in Reaper and it didn't show up. Thoughts?

ToxMox commented 5 years ago

On a whim I renamed it to librnnoise.vst and it worked. Hooray! Thanks for your help :)

werman commented 5 years ago

Hmm, interesting, thanks.

But why .vst... It's a shared library, maybe it's a whim of that application.

werman commented 5 years ago

I'll update documentation later and remove static linking of libgcc

ToxMox commented 5 years ago

I think it was because of the underscore in librnnoise_vst.dylib I renamed again to librnnoise.vst.dylib and that works. Renamed back to the original name to make sure I didn't screw anything up and it isn't seen again.

werman commented 5 years ago

That's not even better. Ok, Then I'll just add that name of the lib may matter, without knowing why it doesn't work like this there is no point in changing default name.

Thanks for the investigation!

ToxMox commented 5 years ago

Just to add to this. The plugin is only working in Reaper on the Mac. All other apps that support VSTs don't seem to detect or work with it. I think it has something to do with it being a dylib instead of bundled into a VST or something. Kind of above my pay grade.

werman commented 5 years ago

Huh, and here I thought it would just work™...

And I think I found what to do with it - https://github.com/overdrivenpotato/rust-vst2/issues/6

ToxMox commented 5 years ago

Thanks! I did the Xcode instructions and that worked.

werman commented 5 years ago

That's great! So you created the right folder structure, Info.plist, removed *.dylib extension and it worked?

ToxMox commented 5 years ago

In Xcode I used the bundle template then I created the structure using Xcode. I then copied the plist example over from that thread. And yes I did remove the .dylib extension.

I first tried that shell script someone posted there but that didn't seem to work. I can try that again later and report back.

This bundling of the dylib also explains the issue above about having to rename the file then Reaper saw it. Turns out Reaper just doesn't care about the bundle stuff I guess. Now that it is properly bundled I'm assuming it works now in all the apps.

werman commented 5 years ago

Could you post the working end result you have?

ToxMox commented 5 years ago

rnnoise.vst.zip Let me know if this is what you are looking for.

werman commented 5 years ago

Yes, thanks.

richtong commented 2 years ago

On macOS Monterey 12.1 on an M1 Mac MacBook, I downloaded it and stuck it into ~/Library/Audio/Plug-Ins/VST but the rnnoise.vst is not recognized by OBS.

kuyazee commented 2 years ago

@richtong did you get it to work? Also tried on my M1 MBP on BigSur and can't seem to make it work

AGulev commented 2 years ago

I tp to show plugin interface and see nothing : macOS Monterey M1 Max

kuyazee commented 2 years ago

@AGulev try #136 we discuss the vst issue there