hydrogen-music / hydrogen

The advanced drum machine for Linux, macOS, and Windows
http://www.hydrogen-music.org
GNU General Public License v2.0
1.03k stars 172 forks source link

LADSPA on mac not working #742

Open alkurop opened 5 years ago

alkurop commented 5 years ago

Hydrogen version * : 1.0.0-beta1 Operating system + version : Mac OS Mojave Audio driver + version : Jack


I want to enable effects in the mixer. But Hydrogen shows error message "LADSPA effects not available". What should I do to turn them on?

mauser commented 5 years ago

Hey,

most probably ladspa was not available when you compiled Hydrogen.

theGreatWhiteShark commented 5 years ago

How did you install the LADSPA plugins?

On LInux you can find them bundled in dedicated package but on Mac I couldn't find anything using brew and port. I'm not too much into LADSPA and never used my Mac at work for something serious but (apart from some FFTW and maybe LAPACK packages) I do not see why one shouldn't be able to use LADSPA plugins on Mac right away. But you might need to compile and install them on your own.

For what it's worth: Audacity, which is available using port, does provide both header and source files for the LADSPA API but does not install any plugins for you.

mauser commented 5 years ago

Hi!

@theGreatWhiteShark : The LADSPA Plugins which are installed on the machine are not the problem. The problem is that his hydrogen version has been compiled without LADSPA support (technically: H2CORE_HAVE_LADSPA is not defined). This happens if during compile time the ladspa header cannot be found.

theGreatWhiteShark commented 5 years ago

@mauser did LADSPA on Mac ever worked? I struggle to find any hints in the net except for programs shipping their own ladspa.h (shall we do the same and only use it with macOS?).

At least on the macOS laptop I have access to I do not find any alternative to the noise library in Linux. Sure, one can get the source code of various LADSPA plugins and compile and install them on macOS. But since there is no LADSPA SDK, FindLadspa.cmake is not able to list and include them.

I'm also surprised to find that one is able to install a version of Hydrogen via sudo port hydrogen +lrdf, which compiles against liblrdf. But since the H2CORE_HAVE_LRDF are wrapped with H2CORE_HAVE_LADSPA, which is unset, this variant has no addiional features at all. But the corresponding Portfile is easy to understand and it should be no problem fixing it

theGreatWhiteShark commented 5 years ago

Well, it turns out we already ship our own ladspa.h file, link against it and only using cmake to find the shared objects of the installed plugins.

It feels like reinventing the wheel and missing the way LADSPA were intended to be used on macOS but here is a short guide how to use the TAP plugins with Hydrogen on macOS Mojave

In a terminal (everything in the same session):

Setting up the LADSPA plugins

  1. git clone https://github.com/tomszilagyi/tap-plugins
  2. cd tap-plugins; make; sudo make install; cd ..
  3. export LADSPA_PATH=/usr/local/lib/ladspa

You might want to copy the command in step 3 into your .bashrc file to avoid typing it in everytime you are about to open up Hydrogen

Installing the patched Hydrogen version

  1. sudo port install cmake libsndfile jack cppunit libarchive qwt-qt5 qt5-qtxmlpatterns liblo liblrdf rubberband
  2. git clone https://github.com/thegreatwhiteshark/hydrogen
  3. cd hydrogen; git checkout macOSLadspaSupport
  4. mkdir build; cd build; cmake ..; make
  5. ./src/gui/hydrogen.app/Contents/MacOS/hydrogen
mauser commented 5 years ago

@theGreatWhiteShark : This is really confusing and also new to me. In addition, Hydrogen ships not only one, but two versions of that header. In my opinion both can and should be removed. This would be also a good occasions to remove the "plugins" folder from Hydrogen, which does no seem to be used by anyone these days. I will care for that later..