Adding LV2 controllers for setBfree-drawbars

Hi @ll,

I am currently working on the implementation of LV2-control-ports for the setBfree Hamond simulation. The good news: yes, can be done. The bad news: it’s not so easy to adapt this, so I will need some time.

Why I am doing this?
I have a Roland A800-pro MIDI keyboard with some MIDI-sliders. With mod-ui you can connect MIDI controllers to LV2-control-ports - so some drawbards can be used live while playing this fantastic instrument.

Regards, Holger

P.S.: BTW: How many drawbards has a real Hamond for the pedal-manual?

1 Like

Hi @C0d3man!

Currently the setBfree drawbars are assigned to MIDI CC. There is a default configuration but it can be changed by config file. The zynthian’s setBfree standalone engine use this to “map” the drawbars controls to the zynthian UI.

So, you don’t need to implement the LV2-control-ports for controlling the setBfree drawbars from your keyboard. You only have to adjust the controller configuration. Of course, if you want integration with MOD-UI and easy MIDI learning, the LV2-control ports are needed.

In that case, you will find very intereseting this thread:

https://www.spinics.net/lists/linux-audio-users/msg101078.html

Best Regards!

Traditional consoles 2drawbars 16’ and 8’ if you need more info contact me as I have spent 50+ years working with Hammonds around the world
Mike
mikemp@warwickelectronics.com

Many thanks! Very interesting!

I think there must be a solution for how to use control ports found for LV2, but until this I will try to make create a usable hack for setBfree.

Regards, Holger

Hi @Mikemp

Ahhh! many thanks. Internally setBfree has an array with 9 drawbars for the pedal-manual. I was a little bit confused about that but I think they made this for easier programing.

Thanks! I wil come back later after xmas - now I will unpack @jofemodo xmas-gifts :wink: :christmas_tree:

Regards, Holger

Hi @ll @Mikemp @freeKey

I am nearly ready with patching setbfree for using controller with MOD-UI! Wow - it works so nice!!! Currently it can be installed by the “power-users” with getting the code from https://github.com/dcoredump/setBfreak.git

It will be automaticly installed and updated for all when ready with full testing. Perhaps it must also be renamed…

This is what the hacked setBfree now can:

  • Drawbars, vibrato, etc. are now LV2 controllers and can be assigned to MIDI controllers via the MOD-UI MIDI-learn feature
  • Removed preamp, reverb and whirl from the main setBfree as they are seperate plugins.
  • Added a Motor on/off LV2-controller for the whirl, so starting/stopping the whirl can also be assigned to a MIDI controller
  • For hackers: tuning the hardware parameters can be done inside the hardware/default.cfg file - and setBfree has sooooo much parameters for this :slight_smile:

So, please: give it a try and some information if it is usable or what can be done better!

Regards, Holger

1 Like

… replying to my own messages - I must be very lonesome :smile:

ok - it’s done: I am ready with adding controllers to setbfree and now this fork is called setBfreak:

  • Drawbars, vibrato, etc. are now LV2 controllers and can be assigned to MIDI controllers via the MOD-UI MIDI-learn feature
  • Removed preamp, reverb and whirl from the main setBfree as they are seperate plugins.
  • Added a motor on/off LV2-controller for the whirl, so starting/stopping the whirl can also be assigned to a MIDI controller
  • Added LV2-controller for switching between slow and fast mode - also MIDI assignable.
  • For hackers: tuning the hardware parameters can be done inside the hardware/default.cfg file - and setBfree has sooooo much parameters for this :slight_smile:

Currently the conversation-script for creating/porting presets is not ready - next week :slight_smile:

Instalation (until next Zynthian release):

  1. Login via ssh
  2. cd /zynthian/zynthian-sw/plugins
  3. git clone https://github.com/dcoredump/setBfreak
  4. cd setBfreak
  5. make install
  6. Start MOD-UI and test… especially b_synth and b_whirl in combination (with sustain key assigned to motor slow/fast)

Regards, Holger

1 Like

Hi @C0d3man!

Good work!! I will try it ASAP.
These days i’m a little busy but i hope to have some time the next week.

Regards

Thank you for adding this nice feature!

I could not wait for it to be included in the next Zynthian release so I tried to follow your Instructions - but sadly it looks like a lot of dependencies are missing.:grin:

I guess I`ll have to wait then. :wink:

[details=Output]root@zynthian:~# cd /zynthian/zynthian-sw/plugins
root@zynthian:/zynthian/zynthian-sw/plugins# git clone https://github.com/dcoredump/setBfreak
Cloning into ‘setBfreak’…
remote: Counting objects: 4555, done.
remote: Compressing objects: 100% (212/212), done.
remote: Total 4555 (delta 126), reused 0 (delta 0), pack-reused 4334
Receiving objects: 100% (4555/4555), 17.71 MiB | 3.99 MiB/s, done.
Resolving deltas: 100% (3200/3200), done.
Checking connectivity… done.
root@zynthian:/zynthian/zynthian-sw/plugins# cd setBfreak
root@zynthian:/zynthian/zynthian-sw/plugins/setBfreak# make install
make -C b_overdrive install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/b_overdrive’
Version: 0.8.4-23 -> 0 8 4 23
LV2 Version: 2057 47
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -DHAVE_LIBLO pkg-config --cflags liblo -c -o overdrive.o overdrive.c
sed “s/@LV2NAME@/b_overdrive/;s/@LIB_EXT@/.so/” manifest.ttl.in > manifest.ttl
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -DHAVE_LIBLO pkg-config --cflags liblo -fvisibility=hidden
-o b_overdrive.so lv2.c overdrive.o
-shared -Wl,-Bstatic -Wl,-Bdynamic
sed “s/@VERSION@/lv2:microVersion 47 ;lv2:minorVersion 2057 ;/g;s/@MODBRAND@//;s/@MODLABEL@//”
b_overdrive.ttl.in > b_overdrive.ttl
install -d /zynthian/zynthian-plugins/lv2/b_overdrive
install -m755 b_overdrive.so /zynthian/zynthian-plugins/lv2/b_overdrive
install -m644 manifest.ttl b_overdrive.ttl modgui.ttl /zynthian/zynthian-plugins/lv2/b_overdrive
cp -R modgui /zynthian/zynthian-plugins/lv2/b_overdrive
make[1]: Leaving directory '/zynthian/zynthian-sw/plugins/setBfreak/b_overdrive’
make -C b_whirl install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/b_whirl’
Version: 0.8.4-23 -> 0 8 4 23
LV2 Version: 2057 47
Makefile:34: “whirl/leslie GUI will not be built"
Makefile:35: “robtk or its dependencies are missing"
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION=”“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM pkg-config --cflags lv2 -fvisibility=hidden -c -o whirl.o whirl.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION=”“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM pkg-config --cflags lv2 -fvisibility=hidden -c -o eqcomp.o eqcomp.c
sed “s/@LV2NAME@/b_whirl/;s/@LIB_EXT@/.so/” manifest.ttl.in > manifest.ttl
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM pkg-config --cflags lv2 -fvisibility=hidden
-o b_whirl.so lv2.c whirl.o eqcomp.o
-shared -Wl,-Bstatic -Wl,-Bdynamic
sed “s/@VERSION@/lv2:microVersion 47 ;lv2:minorVersion 2057 ;/g;s/@MODBRAND@//;s/@MODLABEL@//”
b_whirl-configurable.ttl.in > b_whirl-configurable.ttl
sed “s/@VERSION@/lv2:microVersion 47 ;lv2:minorVersion 2057 ;/g;s/@MODBRAND@//;s/@MODLABEL@//”
b_whirl.ttl.in > b_whirl.ttl
install -d /zynthian/zynthian-plugins/lv2/b_whirl
install -m755 b_whirl.so /zynthian/zynthian-plugins/lv2/b_whirl
install -m644 manifest.ttl b_whirl*.ttl modgui*.ttl /zynthian/zynthian-plugins/lv2/b_whirl
cp -R modgui /zynthian/zynthian-plugins/lv2/b_whirl
make[1]: Leaving directory '/zynthian/zynthian-sw/plugins/setBfreak/b_whirl’
make -C b_reverb install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/b_reverb’
Version: 0.8.4-23 -> 0 8 4 23
LV2 Version: 2057 47
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM pkg-config --cflags lv2 -fvisibility=hidden -c -o reverb.o reverb.c
sed “s/@LV2NAME@/b_reverb/;s/@LIB_EXT@/.so/” manifest.ttl.in > manifest.ttl
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM pkg-config --cflags lv2 -fvisibility=hidden
-o b_reverb.so lv2.c reverb.o
-shared -Wl,-Bstatic -Wl,-Bdynamic
sed “s/@VERSION@/lv2:microVersion 47 ;lv2:minorVersion 2057 ;/g;s/@MODBRAND@//;s/@MODLABEL@//”
b_reverb.ttl.in > b_reverb.ttl
install -d /zynthian/zynthian-plugins/lv2/b_reverb
install -m755 b_reverb.so /zynthian/zynthian-plugins/lv2/b_reverb
install -m644 manifest.ttl b_reverb.ttl modgui.ttl /zynthian/zynthian-plugins/lv2/b_reverb
cp -R modgui /zynthian/zynthian-plugins/lv2/b_reverb
make[1]: Leaving directory '/zynthian/zynthian-sw/plugins/setBfreak/b_reverb’
make -C b_conv install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/b_conv’
make[1]: Nothing to be done for ‘install’.
make[1]: Leaving directory '/zynthian/zynthian-sw/plugins/setBfreak/b_conv’
make -C src install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/src’
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o midi.o midi.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o midi_aseq.o midi_aseq.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o state.o state.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o vibrato.o vibrato.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o tonegen.o tonegen.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o program.o program.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o pgmParser.o pgmParser.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o cfgParser.o cfgParser.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o main.o main.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o midnam.o midnam.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack -c -o memstream.o memstream.c
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION="“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/b_overdrive/ -I…/b_whirl -I…/b_reverb -I…/b_conv -DSHAREDIR=""/usr/local/share/setBfree"" pkg-config --cflags jack
-o setBfree midi.o midi_aseq.o state.o vibrato.o tonegen.o program.o pgmParser.o cfgParser.o main.o midnam.o memstream.o …/b_reverb/reverb.c …/b_whirl/eqcomp.c …/b_whirl/whirl.c …/b_overdrive/overdrive.c
-lm -lpthread pkg-config --libs jack
install -d /usr/local/bin
install -m755 setBfree /usr/local/bin
install -d /usr/local/share/setBfree/cfg
install -d /usr/local/share/setBfree/pgm
install -m644 …/cfg/.cfg /usr/local/share/setBfree/cfg
install -m644 …/pgm/
.pgm /usr/local/share/setBfree/pgm
make[1]: Leaving directory '/zynthian/zynthian-sw/plugins/setBfreak/src’
make -C b_synth install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/b_synth’
Version: 0.8.4-23 -> 0 8 4 23
LV2 Version: 2057 47
Makefile:19: "Synth GUI will not be built"
Makefile:20: "either openGL/GLU is not available - install glu-dev, ftgl-dev"
Makefile:21: “or /usr/share/fonts/truetype/ttf-bitstream-vera/VeraBd.ttf cannot be found"
sed “s/@LV2NAME@/b_synth/;s/@LIB_EXT@/.so/” manifest.ttl.in > manifest.ttl
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DVERSION=”“0.8.4-23"” -DHAVE_LV2_1_8 -DHAVE_MEMSTREAM -I…/src -I…/b_overdrive -I…/b_reverb -I…/b_whirl pkg-config --cflags lv2 -DLV2SYNTH -fvisibility=hidden -std=c99
-o b_synth.so
lv2.c …/src/midi.c …/src/cfgParser.c …/src/program.c …/src/vibrato.c …/src/state.c …/src/tonegen.c …/src/pgmParser.c …/src/memstream.c …/src/midnam.c …/b_whirl/eqcomp.c …/b_whirl/whirl.c …/b_overdrive/overdrive.c …/b_reverb/reverb.c
-shared -Wl,-Bstatic -Wl,-Bdynamic -lm
sed “s/@VERSION@/lv2:microVersion 47 ;lv2:minorVersion 2057 ;/g;s/@MODBRAND@//;s/@MODLABEL@//”
b_synth.ttl.in > b_synth.ttl
install -d /zynthian/zynthian-plugins/lv2/b_synth
install -m755 b_synth.so /zynthian/zynthian-plugins/lv2/b_synth
install -m644 manifest.ttl b_synth.ttl modgui.ttl /zynthian/zynthian-plugins/lv2/b_synth
install -d /zynthian/zynthian-plugins/lv2/b_synth/hardware
install -m644 hardware/default.cfg /zynthian/zynthian-plugins/lv2/b_synth/hardware
cp -R modgui /zynthian/zynthian-plugins/lv2/b_synth
make[1]: Leaving directory '/zynthian/zynthian-sw/plugins/setBfreak/b_synth’
make -C ui install
make[1]: Entering directory '/zynthian/zynthian-sw/plugins/setBfreak/ui’
Makefile:50: standalone JACK/GL-GUI will not be built
make[1]: Nothing to be done for ‘install’.
make[1]: Leaving directory ‘/zynthian/zynthian-sw/plugins/setBfreak/ui’[/details]

Strange! Everything looks fine. I forgot to mention that a restart of MOD-UI (or the complete Zynthian) is necessary, because the plugin-list had to be re-read. Can you confirm that it does work after reloading/restarting?

I just added a pgm->lv2 converter and a bunch of full converted presets :slight_smile:
Manually updating:

  1. Login via ssh
  2. cd /zynthian/zynthian-sw/plugins/setBfreak
  3. git pull
  4. make install

(Re-)Start MOD-UI and test…

Regards, Holger

Regards, Holger

Hello Holger!

It does work! Thank you for helping me to get it running :grinning:

Thanks again,
Martin

@lod

Thanks for reporting! If you find problems with setBfreak, please let me know. I have tested a lot, but I think I haven’t found all problems…

One problem I noticed: The whirl (leslie) does use lots of CPU cycles. My Raspi2 has sometimes xruns, the Raspi3 not - but also on the Raspi3 there is not much CPU time for other effects left :frowning:

Regards, Holger

Hi Holger!

After doing your patch, the MOD plugin works fine, but the original setBfree engine lost some features like leslie and drawbar controls. Is it normal behavior? If its normal, how could I set back the original engine?

Thanks, Norbim

Hi @norbim,

Hmmm… I dropped the leslie/reverb/overdrive from the setBfreak so you have to add them as separate plugins in the audio chain. But the original setBfree should not be affected by that. You should have a setBfree plugin along the setBfreak which should work as before.

Maybe there is a problem due to an internal library which is also used by setBfree - I have to check this tomorrow and will fix it.

Regards, Holger

Sorry Norbim - my fault. When installing setBfreak it overrides setBfree - not only the MOD-UI plugins but also the standalone engine. To get the standalone version back do the following:

ssh root@<YOUR-ZYNTHIAN-IP>
cd /zynthian/zynthian-sw/setBfree
make install

This overrides the setBfreak-installation! I will fix this inside the setBfreak code the next days, so both can be used side-by-side.

Thanks for reporting!

Regards, Holger

1 Like

Thanks Holger,
setBfree works again like before. I’m waiting for the fix.

@norbim

The fix is ready. I have renamed the LV2-plugin from b_synth to setBfreak_synth (and the other plugins also from b_* to setBfreak_*). So the original setBfree and the patched setBfreak LV2-plugins can live together on a Zynthian.

To fix your installation do the following:

cd /zynthian/zynthian-sw/setBfree
make install
cd …/plugins/setBfreak
git pull
make install

Restart Zyntian and the standalone setBfree and the modified setBfreak should work.

Have fun and play loud, Holger

1 Like

Thanks Holger! Perhaps we could have a full standalone version of setBfreak in the future? :wink:
Regards!

Hi @jofemodo

you mean a the jack or alsa version?
It is a complete version including the standalone version. The only thing which has the original naming scheme is the UI for OpenGL (which we don’t use).

Regards, Holger

Tested, both are working well.
Thanks a lot Holger.