zynaddsubfx as lv2 plugin

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

OMG, you pulled it off! Porting one of the most important and well known softsynths to LV2. I could test, I've got a good testing project for it with like 20+ tracks with ZynAddSubFX DSSI plug-ins and three Yoshimi instances for the Pad sounds the DSSI plug-in can't do.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

What do you mean by "UIs for audio and midi file plugins"?
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

It doesn't build:

Code: Select all

vex.cpp:22:22: fatal error: vex/cArp.h: No such file or directory
...
jeremy@bto:~/PPA/zynaddsubfx-lv2/zynaddsubfx-lv2$ find . -name vex
./source/modules/carla_native/vex
jeremy@bto:~/PPA/zynaddsubfx-lv2/zynaddsubfx-lv2$ ls -al ./source/modules/carla_native/vex
total 32
drwxrwxr-x  2 jeremy jeremy 4096 Aug 21 14:44 .
drwxrwxr-x 13 jeremy jeremy 4096 Aug 21 14:44 ..
lrwxrwxrwx  1 jeremy jeremy   68 Aug 21 14:44 cArp.h -> /home/falktx/Personal/FOSS/GIT/distrho/ports/vex/source/synth/cArp.h
lrwxrwxrwx  1 jeremy jeremy   76 Aug 21 14:44 cArpSettings.h -> /home/falktx/Personal/FOSS/GIT/distrho/ports/vex/source/synth/cArpSettings.h
lrwxrwxrwx  1 jeremy jeremy   71 Aug 21 14:44 cChorus.h -> /home/falktx/Personal/FOSS/GIT/distrho/ports/vex/source/synth/cChorus.h
lrwxrwxrwx  1 jeremy jeremy   70 Aug 21 14:44 cDelay.h -> /home/falktx/Personal/FOSS/GIT/distrho/ports/vex/source/synth/cDelay.h
lrwxrwxrwx  1 jeremy jeremy   71 Aug 21 14:44 cReverb.h -> /home/falktx/Personal/FOSS/GIT/distrho/ports/vex/source/synth/cReverb.h
lrwxrwxrwx  1 jeremy jeremy   70 Aug 21 14:44 freeverb -> /home/falktx/Personal/FOSS/GIT/distrho/ports/vex/source/synth/freeverb
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

Thanks. I know but I prefer packaging it locally and the directory in which I do that happens to be named PPA.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

Code: Select all

In file included from vex.cpp:25:0:
vex/cReverb.h:43:33: fatal error: freeverb/revmodel.hpp: No such file or directory
compilation terminated.
tatch
Established Member
Posts: 662
Joined: Fri Nov 16, 2012 3:18 pm

Re: zynaddsubfx as lv2 plugin

Post by tatch »

can it do parameter automation?
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

github is down so I can't pull :(
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

falkTX wrote:
tatch wrote:he's working on exposing all parameters, I'm waiting to see how that goes.
One more reason to stop maintaining Yoshimi, there is now a double effort going on.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

Thanks. In the meanwhile github came up again. It doesn't build yet though:

Code: Select all

make -C source/plugin/
make[2]: Entering directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821/source/plugin'
g++ carla-native-export.cpp -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu++0x -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fvisibility-inlines-hidden -I../includes -I../modules -I../utils -DWANT_OPENGL -DWANT_AUDIOFILE -DWANT_MIDIFILE -DWANT_ZYNADDSUBFX -c -o carla-native-export.cpp.o
make -C ../modules carla_native
make[3]: Entering directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821/source/modules'
make -C carla_native
make[4]: Entering directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821/source/modules/carla_native'
cc bypass.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o bypass.c.o
cc lfo.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o lfo.c.o
cc midi-gain.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o midi-gain.c.o
cc midi-split.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o midi-split.c.o
cc midi-through.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o midi-through.c.o
cc midi-transpose.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o midi-transpose.c.o
cc nekofilter.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o nekofilter.c.o
g++ vex.cpp -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu++0x -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fvisibility-inlines-hidden -fvisibility-inlines-hidden -I. -I.. -I../../includes -I../../utils -c -o vex.cpp.o
In file included from vex.cpp:18:0:
CarlaNative.hpp:533:21: warning: unused parameter 'index' [-Wunused-parameter]
In file included from vex.cpp:22:0:
vex/cArp.h: In member function 'const juce::MidiBuffer& VexArp::processMidi(juce::MidiBuffer&, bool, double, double, double, int)':
vex/cArp.h:196:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
vex/cArp.h:210:83: warning: array subscript has type 'char' [-Wchar-subscripts]
vex/cArp.h:216:108: warning: array subscript has type 'char' [-Wchar-subscripts]
In file included from vex/freeverb/revmodel.hpp:10:0,
                 from vex/cReverb.h:43,
                 from vex.cpp:25:
vex/freeverb/comb.hpp: In member function 'float comb::process(float)':
vex/freeverb/comb.hpp:41:24: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
vex/freeverb/comb.hpp:44:24: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
In file included from vex/freeverb/revmodel.hpp:11:0,
                 from vex/cReverb.h:43,
                 from vex.cpp:25:
vex/freeverb/allpass.hpp: In member function 'float allpass::process(float)':
vex/freeverb/allpass.hpp:36:24: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
g++ audio-file.cpp -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu++0x -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fvisibility-inlines-hidden -fvisibility-inlines-hidden -I. -I.. -I../../includes -I../../utils -c -o audio-file.cpp.o
In file included from audio-file.cpp:18:0:
CarlaNative.hpp:533:21: warning: unused parameter 'index' [-Wunused-parameter]
cc audio_decoder/ad_ffmpeg.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o audio_decoder/ad_ffmpeg.c.o
cc audio_decoder/ad_plugin.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o audio_decoder/ad_plugin.c.o
cc audio_decoder/ad_soundfile.c -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu99 -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -I. -I../../includes -c -o audio_decoder/ad_soundfile.c.o
g++ midi-file.cpp -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu++0x -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fvisibility-inlines-hidden -fvisibility-inlines-hidden -I. -I.. -I../../includes -I../../utils -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -c -o midi-file.cpp.o
In file included from midi-file.cpp:18:0:
CarlaNative.hpp:533:21: warning: unused parameter 'index' [-Wunused-parameter]
ntk-fluid -c -o zynaddsubfx/UI/ADnoteUI.cpp -h zynaddsubfx/UI/ADnoteUI.h zynaddsubfx/UI/ADnoteUI.fl
ntk-fluid -c -o zynaddsubfx/UI/BankUI.cpp -h zynaddsubfx/UI/BankUI.h zynaddsubfx/UI/BankUI.fl
ntk-fluid -c -o zynaddsubfx/UI/ConfigUI.cpp -h zynaddsubfx/UI/ConfigUI.h zynaddsubfx/UI/ConfigUI.fl
ntk-fluid -c -o zynaddsubfx/UI/EffUI.cpp -h zynaddsubfx/UI/EffUI.h zynaddsubfx/UI/EffUI.fl
ntk-fluid -c -o zynaddsubfx/UI/EnvelopeUI.cpp -h zynaddsubfx/UI/EnvelopeUI.h zynaddsubfx/UI/EnvelopeUI.fl
ntk-fluid -c -o zynaddsubfx/UI/FilterUI.cpp -h zynaddsubfx/UI/FilterUI.h zynaddsubfx/UI/FilterUI.fl
ntk-fluid -c -o zynaddsubfx/UI/LFOUI.cpp -h zynaddsubfx/UI/LFOUI.h zynaddsubfx/UI/LFOUI.fl
ntk-fluid -c -o zynaddsubfx/UI/MasterUI.cpp -h zynaddsubfx/UI/MasterUI.h zynaddsubfx/UI/MasterUI.fl
ntk-fluid -c -o zynaddsubfx/UI/MicrotonalUI.cpp -h zynaddsubfx/UI/MicrotonalUI.h zynaddsubfx/UI/MicrotonalUI.fl
ntk-fluid -c -o zynaddsubfx/UI/OscilGenUI.cpp -h zynaddsubfx/UI/OscilGenUI.h zynaddsubfx/UI/OscilGenUI.fl
ntk-fluid -c -o zynaddsubfx/UI/PADnoteUI.cpp -h zynaddsubfx/UI/PADnoteUI.h zynaddsubfx/UI/PADnoteUI.fl
ntk-fluid -c -o zynaddsubfx/UI/PartUI.cpp -h zynaddsubfx/UI/PartUI.h zynaddsubfx/UI/PartUI.fl
ntk-fluid -c -o zynaddsubfx/UI/PresetsUI.cpp -h zynaddsubfx/UI/PresetsUI.h zynaddsubfx/UI/PresetsUI.fl
ntk-fluid -c -o zynaddsubfx/UI/ResonanceUI.cpp -h zynaddsubfx/UI/ResonanceUI.h zynaddsubfx/UI/ResonanceUI.fl
ntk-fluid -c -o zynaddsubfx/UI/SUBnoteUI.cpp -h zynaddsubfx/UI/SUBnoteUI.h zynaddsubfx/UI/SUBnoteUI.fl
ntk-fluid -c -o zynaddsubfx/UI/VirKeyboard.cpp -h zynaddsubfx/UI/VirKeyboard.h zynaddsubfx/UI/VirKeyboard.fl
g++ zynaddsubfx.cpp -Wall -Wextra -fPIC -DPIC -pipe -DNDEBUG -O3 -ffast-math -mtune=generic -msse -mfpmath=sse -fdata-sections -ffunction-sections -fvisibility=hidden -std=gnu++0x -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -fvisibility-inlines-hidden -fvisibility-inlines-hidden -I. -I.. -I../../includes -I../../utils -D_THREAD_SAFE -D_REENTRANT -I/opt/kxstudio//include   -DNTK_GUI -DWANT_ZYNADDSUBFX_UI -pthread -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/usr/include/ntk -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12   -c -o zynaddsubfx.cpp.o
In file included from zynaddsubfx.cpp:22:0:
CarlaNative.hpp:533:21: warning: unused parameter 'index' [-Wunused-parameter]
zynaddsubfx.cpp:611:34: error: expected ';' at end of member declaration
zynaddsubfx.cpp:611:40: error: 'final' does not name a type
zynaddsubfx.cpp:616:51: error: expected ';' at end of member declaration
zynaddsubfx.cpp:616:57: error: 'final' does not name a type
zynaddsubfx.cpp:624:36: error: expected ';' at end of member declaration
zynaddsubfx.cpp:624:42: error: 'final' does not name a type
zynaddsubfx.cpp:632:67: error: expected ';' at end of member declaration
zynaddsubfx.cpp:632:69: error: 'final' does not name a type
zynaddsubfx.cpp:638:78: error: expected ';' at end of member declaration
zynaddsubfx.cpp:638:80: error: 'final' does not name a type
zynaddsubfx.cpp:656:19: error: expected ';' at end of member declaration
zynaddsubfx.cpp:656:21: error: 'final' does not name a type
zynaddsubfx.cpp:667:128: error: expected ';' at end of member declaration
zynaddsubfx.cpp:667:130: error: 'final' does not name a type
zynaddsubfx.cpp:680:53: error: expected ';' at end of member declaration
zynaddsubfx.cpp:680:55: error: 'final' does not name a type
zynaddsubfx.cpp:694:40: error: expected ';' at end of member declaration
zynaddsubfx.cpp:694:42: error: 'final' does not name a type
make[4]: *** [zynaddsubfx.cpp.o] Error 1
make[4]: Leaving directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821/source/modules/carla_native'
make[3]: *** [carla_native] Error 2
make[3]: Leaving directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821/source/modules'
make[2]: *** [../modules/carla_native.a] Error 2
make[2]: Leaving directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821/source/plugin'
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/tmp/buildd/zynaddsubfx-lv2-0.0.0+git20130821'
make: *** [build] Error 2
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

Seems to work well, even selecting instruments via Qtractor's track properties. That does generate an xrun each time you select a different instrument though. Couldn't stress-test it yet.
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

falkTX wrote:hm, those were not supposed to be there.

my internal API handles midi-programs with a channel parameter for synths, which no plugin spec handles right now.
this means in carla, some synths have different programs in 1-16 channels (fluidsynth and internal synths).
since this will get the host confused, I prefer to hide midi-programs from the synths. It seems Qtractor is ignoring lv2:extensionData...
They're there and stuff gets mixed up especially when you have to save the track properties afterwards. Weird stuff happens then, instruments from one bank lower might load and sometimes the ZynAddSubFX GUI shows gibberish as the instrument name.

I also did a stress test with a project that contains 14 ZynAddSubFX-LV2 instances. They use some more CPU than their DSSI counterparts so with this project my CPU maxes out :twisted: Other than that the plug-ins keep up well so hats off falkTX!
2013-08-23-221219_3840x1080_scrot.png
2013-08-23-221219_3840x1080_scrot.png (772.09 KiB) Viewed 1854 times
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

falkTX wrote:You should pull latest git. I've disabled plugin-exposed midi-programs for zyn.
It now works, Qtractor doesn't show any instrument info anymore.
falkTX wrote:If possible, you should use only 1 zyn instance, sending it MIDI data from different channels.
I don't know if this is possible in Qtractor...
Yes, that's possible and sending MIDI data from different channels works. Omni mode doesn't work though but maybe I'm using it wrong so have to check the manual. So I can't get sending data from multiple MIDI channels simultaneously to work.
bazsound
Established Member
Posts: 480
Joined: Sat Aug 03, 2013 11:46 am

Re: zynaddsubfx as lv2 plugin

Post by bazsound »

ive tried the plugin in muse and get delay on every patch cant work out what muse is doing to send it delay.

is it possible to port yoshimi to an lv2 plugin?
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: zynaddsubfx as lv2 plugin

Post by autostatic »

I think I once said that if ZynAddSubFX would become available as an LV2 plug-in I'd stop maintaining Yoshimi.
User avatar
Heikki Ketoharju
Established Member
Posts: 40
Joined: Thu Mar 22, 2012 9:24 am

Re: zynaddsubfx as lv2 plugin

Post by Heikki Ketoharju »

Tried to compile, but got following error:

Code: Select all

carla-native-lv2-export.cpp: In function ‘void writePluginFile(const PluginDescriptor*)’:
carla-native-lv2-export.cpp:253:29: error: ‘PLUGIN_NEEDS_STATIC_BUFFERS’ was not declared in this scope
make: *** [carla-native-lv2-export.cpp.o] Error 1
Is this just some trivial error by me?
Post Reply