Porting JUCE programs to DISTRHO/juce for LV2 support

Programming applications for making music on Linux.

Moderators: khz, MattKingUSA

Basslint
Established Member
Posts: 197
Joined: Sun Jan 27, 2019 2:25 pm
Location: Italy

Porting JUCE programs to DISTRHO/juce for LV2 support

Postby Basslint » Sun Oct 13, 2019 8:07 am

There are several libre JUCE plugins around that can't be easily run on GNU/Linux due to the fact that they use the official release of JUCE, so they only support VST2s (annoying because of the SDK, DMCAs, deprecated standard, etc.).

I'd like to port them to DISTRHO/juce so that they can be built as LV2 plugins. What steps do I have to follow in order to do that?

I am looking at an example like https://github.com/jpcima/tunefish (which replaced the official JUCE on https://github.com/paynebc/tunefish with DISTRHO/juce) but if someone who's more experienced than I am has some tips, I would be very grateful for them :D
The community of believers was of one heart and mind, and no one claimed that any of his possessions was his own, but they had everything in common. [Acts 4:32]

Kott
Established Member
Posts: 100
Joined: Thu Mar 21, 2013 12:55 am
Location: Vladivostok

Re: Porting JUCE programs to DISTRHO/juce for LV2 support

Postby Kott » Thu Oct 17, 2019 5:06 am

I'll post it here.

Let's take https://github.com/cognitone/sprike because it very same as Tunefish4 and uses "old" JUCE.

after git clone add DISTRHO-JUCE as submodule inside Sprike dir:
git submodule add https://github.com/DISTRHO/juce.git thirdparty/JUCE

build Projucer:

cd thirdparty/JUCE/extras/Projucer/Builds/LinuxMakefile/
make


now we have to run Projucer and make some additions to Sprike.jucer: change moudules path to ../thirdparty/JUCE/modules , turn on options that you want: enable standalone, jack etc

save, it will generate general Makefile

Then I took LV2.mak and generate-lv2-ttl.py from https://github.com/jpcima/tunefish/tree ... /tunefish4

add LV2.mak to Makefile:

echo "include ../../LV2.mak" >>Builds/LinuxMakefile/Makefile

changed plugin name in LV2.mak

add LV options to JuceLibraryCode/AppConfig.h :

Code: Select all

// [BEGIN_USER_CODE_SECTION]

// (You can add your own code in this section, and the Projucer will not overwrite it)
#define JucePlugin_Build_LV2 1
#define JucePlugin_LV2URI "https://github.com/cognitone/sprike"


// [END_USER_CODE_SECTION]


that's all (IIRC), go to Builds/LinuxMakefile and do make

Kott
Established Member
Posts: 100
Joined: Thu Mar 21, 2013 12:55 am
Location: Vladivostok

Re: Porting JUCE programs to DISTRHO/juce for LV2 support

Postby Kott » Wed Oct 23, 2019 12:18 am

As with "official" version 5.1.2 thinks go well. Recent version of JUCE with Debian patches https://salsa.debian.org/multimedia-tea ... ter/debian run me to troubles.
I can compile most of plugins that requires JUCE >=5.4.4
But they hangs the host when loaded. According to strace there infinite loop (or lock) in some futex, as I can understand, cause I know nothing of multithread programming.

We would be very appreciate any help in this issue, just tell me where to look at first.


Return to “Developer's Section”

Who is online

Users browsing this forum: No registered users and 1 guest