Closed baconpaul closed 3 years ago
Here is the PR with LV2 for cmake https://github.com/DISTRHO/JUCE/pull/13 with invocation of ttl generator. It works, but hasn't finally discussed and adopt.
Oh ha cool. And it does seem like it's always the same 5 or 6 people kicking around on these issues. jatin has been adding a bunch to surge, etc....
we are moving surge proper to juce after we ship 19 and we hope that will get us an LV2 back. But we have other juce synths. Would be great if the LV2 Cmake stuff was in @falkTX mainline and then maybe I could try TWS or SurgeFXbank or some such?
You can play with that fork https://github.com/lv2-porting-project/JUCE/tree/lv2 just for testing will it work for you.
Would be great if the LV2 Cmake stuff was in @falkTX mainline
Yeah, build with cmake is much easy than by Projucer and it's automated-builds-friendly.
cool. i'll look this week.
i also don't really remember how to run an lv2 once i have it. I guess move it to ~/.lv2, start ardour on linux, and hope? I'm sure I can figure it out. Right now I'm a bit up to my neck with new surge 1.9 features (1.9 is gonna be awesome!).
yes, ~/.lv2 is the place
simplest way - install jalv https://packages.ubuntu.com/search?suite=all&searchon=names&keywords=jalv, then run (with jackd started):
jalv.gtk https://surge-synthesizer.github.io/lv2/surge
or install Carla, rescan lv2 then add surge or any Linux opensource DAW (and even Reaper 6.24-rc) supports it
also look at @jatinchowdhury18 work https://github.com/Chowdhury-DSP/ChowMatrix/
@baconpaul here is the stochas with lv2 https://build.opensuse.org/package/show/home:kill_it:JUCE/stochas if you interested
@KottV any chance you can give surge a whirl? There's a (somewhat broken) alpha version that builds at head now and that also builds the (not at all alpha, production) surge effects bank, all using juce cmake.
@KottV any chance you can give surge a whirl? There's a (somewhat broken) alpha version that builds at head now and that also builds the (not at all alpha, production) surge effects bank, all using juce cmake.
Ok, it builds .so but segfaults on generating .ttl
gdb -ar lv2_ttl_generator ./Surge\ XT.so
GNU gdb (GDB; openSUSE Tumbleweed) 10.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://bugs.opensuse.org/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from lv2_ttl_generator...
(gdb) run
Starting program: /home/kv/bin/lv2_ttl_generator ./Surge\ XT.so
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Generate ttl data for './Surge XT.so', basename: 'Surge XT'
Writing manifest.ttl...
Program received signal SIGBUS, Bus error.
0x00007ffff65137b8 in SurgeSynthProcessor::getProgramName(int) () from ./Surge XT.so
(gdb) bt
#0 0x00007ffff65137b8 in SurgeSynthProcessor::getProgramName(int) () from ./Surge XT.so
#1 0x00007ffff6509d74 in createLv2Files(char const*) () from ./Surge XT.so
#2 0x0000000000401348 in main ()
Oh that's great to know.
So: How do I get it that far? We could move this to an issue over in surge.
Almost definitely this is happening because surge assumes assets installed to run. In the old surge LV2 generator we have to thread a signal through saying that we are in ttl generating mode; probably have to do same here.
Actually you've got it in the first post.
I did next: replace libs/juce-6.0.7/juce with that fork https://github.com/lv2-porting-project/JUCE/tree/lv2 change from line 1493 in https://github.com/surge-synthesizer/surge/blob/main/CMakeLists.txt#L1493 URI can be any different of course:
FORMATS AU VST3 Standalone LV2
LV2_URI https://surge-synthesizer.github.io/lv2/surge_xt
configure:
cmake -Bbuildxt -DBUILD_SURGE_JUCE_PLUGINS=True -DLV2_TTL_GENERATOR=/usr/bin/lv2_ttl_generator
make
cmake --build buildxt --config Debug --target surge-xt_LV2 -j8
/usr/bin/lv2_ttl_generator is from https://github.com/lv2-porting-project/lv2-ttl-generator you might replace it with your own
as it fails to generate .ttl the cmake will delete Surge XT.so so it's worth to comment generation part https://github.com/lv2-porting-project/JUCE/blob/lv2/extras/Build/CMake/JUCEUtils.cmake#L1325 from L1325 to L1339 for testing
OK to avoid spamming up @falkTX ’s github, I moved this over to https://github.com/surge-synthesizer/surge/issues/4030 and will close this.
If I patch your lib with
then add
LV2
to the surge cmakelists formats and also defineJucePlugin_LV2URI=Foo
in my target_compile_definitions, I get a linked LV2. It's only an SO though, no ttl. But thought I would share.