MOD-UI pedal for SFZ input

Hello Holger,

I have to ask a stupid question:I follow your example procedure I dont get the “./genericfluidplug” script.

While trying to find the cause I visited the https://github.com/dcoredump/GenericFluidPlug git. All files in there are older then 5 month so I guess its not the right place to look.
What am I doing wrong?

Martin

Solved it:
I was cloning the wrong branch. I had to use:

git clone -b generic GitHub - dcoredump/GenericFluidPlug: SoundFonts as LV2 plugins via FluidSynth

I tried with a sf2 downloaded from here (Nice-Keys-PlusSteinway-JNv2.0)

root@zynthian:/zynthian/zynthian-sw/plugins/GenericFluidPlug# perl ./genericfluidplug /root/sf2neu/NiceKeys.sf2 /zynthian/zynthian-sw/plugins/NiceKeys /zynthian/zynthian-plugins/lv2/
src/sflist: 1: src/sflist: Syntax error: word unexpected (expecting ")")
Creating FluidPlug LV2-plugin at /zynthian/zynthian-sw/plugins/NiceKeys
root@zynthian:/zynthian/zynthian-sw/plugins/GenericFluidPlug# cd /zynthian/zynthian-sw/plugins/NiceKeys/
root@zynthian:/zynthian/zynthian-sw/plugins/NiceKeys# make install
rm -rf /zynthian/zynthian-plugins/lv2//FluidPlug_NiceKeys.lv2
cc -mcpu=cortex-a53 -mfpu=neon-fp-armv8 -mneon-for-64bits -mfloat-abi=hard -mvectorize-with-neon-quad -fPIC -DPIC -std=c11 -Wall -c FluidPlug_NiceKeys.c
cc FluidPlug_NiceKeys.o -shared -L/usr/local/lib -lfluidsynth  -o FluidPlug_NiceKeys.so
mkdir -p /zynthian/zynthian-plugins/lv2//FluidPlug_NiceKeys.lv2
cp -R modgui /zynthian/zynthian-plugins/lv2//FluidPlug_NiceKeys.lv2
cp *.ttl /zynthian/zynthian-plugins/lv2//FluidPlug_NiceKeys.lv2
cp FluidPlug_NiceKeys.so /zynthian/zynthian-plugins/lv2//FluidPlug_NiceKeys.lv2
cp NiceKeys.sf2 /zynthian/zynthian-plugins/lv2//FluidPlug_NiceKeys.lv2
root@zynthian:/zynthian/zynthian-sw/plugins/NiceKeys# systemctl restart mod-host && systemctl restart mod-ui

I now have a Pugin in Mod-UI but it does not work:

(The new Plugin is the first on the left)

Gotta get to where MOD UI is making sound in my screwy little dev environment, but then I can’t wait to try this stuff out!

Hi Martin @lod

Oh - yes - sorry. I forgot to make this clear… I added this to the README.MD and will fix my installation manual above.

Wow - very big file! You may get problems using this soundfont. AFAIK Fluidsynth loads the whole soundfont into memory. 1GB RAM - 560MB soundfont… there ist not much memory free for other stuff…

Something strange happens when you start the script… I see: I have to add a check for failing when calling external programs.

  • Can you confirm that you have installed templatetoolkit-perl?
  • I fixed a little problem yesterday night (only a compiler option). Do you have cloned/pulled after 22:00?

I just tried and got Nice-Keys running (on RPi3, my RPi2 based Zynthian is currently at rehearsal room).

Can you pull and try again? If it does not work, please send me the output of the following command:

src/sflist /root/sf2neu/NiceKeys.sf2

Regards, Holger

1 Like

Hi @jofemodo,

When running GenericFluidPlug-generated synths there is a problem with the Zynthian-UI. The sounds are not arranged in presets anymore but in values for a LV2 control port:

 [
        a lv2:InputPort, lv2:ControlPort ;
        lv2:index 4 ;
        lv2:symbol "program" ;
        lv2:name "Program" ;
        lv2:portProperty lv2:enumeration , lv2:integer ;
        lv2:default 0 ;
        lv2:minimum 0 ;
        lv2:maximum 83;
        lv2:scalePoint [
            rdfs:label "Classic Steinway" ;
            rdf:value 0 ;   
        ] , [
            rdfs:label "Studio Steinway" ;
            rdf:value 1 ;
...

This seems not to be recognized by Zynthian-UI so you cannot change the sound by encoder anymore. It seems also that Zynthian-UI hangs until you erase the pedalboard.

Do you have an idea how to fix this?

Regards, Holger

Hello Holger,

Confirmed, templatetoolkit-perl is installed.

I pulled the latest Version from Git - but the error is still there:

root@zynthian:/zynthian/zynthian-sw/plugins/GenericFluidPlug# perl ./genericfluidplug /root/sf2neu/NiceKeys.sf2 /zynthian/zynthian-sw/plugins/NiceKeys /zynthian/zynthian-plugins/lv2/
src/sflist: 1: src/sflist: Syntax error: word unexpected (expecting ")")
Creating FluidPlug LV2-plugin at /zynthian/zynthian-sw/plugins/NiceKeys
root@zynthian:/zynthian/zynthian-sw/plugins/GenericFluidPlug#

The Output of src/sflist /root/sf2neu/NiceKeys.sf2 :

src/sflist /root/sf2neu/NiceKeys.sf2
-bash: src/sflist: No such file or directory

Greetings,
Martin

Edit: sflist does not work … googeling … cant figure out a package for getting this installed …

sflist is a small program made by myself (I noticed that falkTX made such a program after I wrote this small helper :expressionless:). sflist should be compiled automaticly when it not exists. As I wrote: I haven’t checked if the call to system("gcc -o src/sflist src/sflist.c -lfluidsynth"); comes back with an error… I am a bad programmer :cry:

Ok. Let’s compile this small program by ourself:

cd /zynthian/zynthian-sw/plugins/GenericFluidPlug
gcc -std=c11 -o src/sflist src/sflist.c -lfluidsynth

If this works without errors, I hope the generation/installation with genericfluidplug will work, too!

Thanks for testing!

Regards, Holger

P.S.: I am online on gitter (Commuity Zynthian/Makers) if you need “realtime” support :wink:

P.P.S.: Nice-Keys work for me out of the box. Loading time is a little bit longer than for other plugins…

1 Like

Hello Holger,

thank you for finding the root cause so quickly! You where right

cd /zynthian/zynthian-sw/plugins/GenericFluidPlug
gcc -std=c11 -o src/sflist src/sflist.c -lfluidsynth

did the trick. After this step the peal-script worked without error and the soundfont is now available as a plugin in the mod-ui.

It is now working perfectly!

Loading time is still ok - despite the size, thats nice :grinning: . But looking at the RAM usage I have to ask myselve if so many instruments in one plugin are needed - maybe I can split the soundfont into smaller sections …

Greetings,
Martin

Hi Martin @lod

nice to hear that it works and thanks again for testing. Try to use Polyphone for editing sf2 soundfonts.

The problem is fixed in the github-repo, but I want to make the perl script more robust - will do this next week.

Regards, Holger

Hi all,

I added another perl library which makes the call to system() better - it checks internally for errors and creates better error messages.

All users have to install libipc-system-simple-perl when checking out the newest version:

apt-get install -y libipc-system-simple-perl

I also added the make targets clean and veryclean.

Regards, Holger

Hello @C0d3man !

is there a way to make this code-magic of yours also work for *.sfz and maybe *.gig flies as well?

And I would like to add +1 to the qeustion you asked @jofemodo :

Hi @jofemodo,

When running GenericFluidPlug-generated synths there is a problem with the Zynthian-UI. The sounds are not arranged in presets anymore but in values for a LV2 control port:

[
a lv2:InputPort, lv2:ControlPort ;
lv2:index 4 ;
lv2:symbol “program” ;
lv2:name “Program” ;
lv2:portProperty lv2:enumeration , lv2:integer ;
lv2:default 0 ;
lv2:minimum 0 ;
lv2:maximum 83;
lv2:scalePoint [
rdfs:label “Classic Steinway” ;
rdf:value 0 ;
] , [
rdfs:label “Studio Steinway” ;
rdf:value 1 ;

This seems not to be recognized by Zynthian-UI so you cannot change the sound by encoder anymore. It seems also that Zynthian-UI hangs until you erase the pedalboard.

Do you have an idea how to fix this?

Regards, Holger

Hi @lod Martin,

the FluidPlug is a plugin written by falkTX from MOD. I reused it to put a wrapper arround for automatic using of special soundfonts and create the matching configuration files for MOD-UI. FluidPlug is a “simple” LV2 wrapper arround the fluidsynth library - so it can only load soundfonts of supported format. AFAIK this is only SF2.

There is another software arround which loads the other formats: LinuxSampler. I think it is not impossible to make such a plugin - LS has an own LV2 plugin. But we had some license discussion with the LS team in the past: selling Zynthian kits is a problem… I don’t know what this means related to software for a project (where I personally don’t sell anything). The software I had written the last 10 years was completely free. I have no fun to write software and discuss later if I broke the license.

Go ahead and look for their “simple” license. It is short and clear. As far as you don’t make any money (even self-costs of parts!), you can use LS… personally I am not making money - but for the complete project this is not true. What to do???

Regards, Holger

Hi @C0d3man Holger,

Zynthian is a free software. Of cause one needs hardware - but in order to run Linuxsampler some type of hardware is needed anyway so that should not be the problem.
In order to get the needed hardware I could purchase a Pi on Amazon.
But its up to me: I want the free Zynthian and I am free to buy the needed hardware wherever I want.
And that is no theory: Looking at the success cases posed here a lot of people build their own versions of the Zynthian made from parts purchased from different sources. Even 3D-Printed hardware was used!
I could understand if there was a need to buy certain parts from a certain source and the source would take advantage on that - but this is not the case.

But that is only the one side - If you would provide a tool adding sfz to mod-ui everyone could use it - absolutely independent from Zynthian. So just because it could be theoretically used on the Zynthian it should not be a problem.

Last-but-not-least: We are a community of musicians having fun - we even share that with our families and friends. I hereby ask the Linuxsampler devs: Please don`t take that away from us. We should work together to be stronger and better then we ever could be alone.

Kind regards,
Martin

@lod

You speak right out of my heart! Fernando tried to speak with LS team but AFAIK with no result. Take a look at https://www.linuxsampler.org/faq.html

Commercial use is prohibited - no question. I think this is a really good idea because LS engine is powerful - but FluidSynth and other software also - and they have proven licenses.

So we told them what Zynthian is and asked if we had right understood that Zynthian does not need a license. The result was something like that:

If Zynthian sells kits, LS sees the project as commercial. And Zynthian has self-commited to be commercial, because we had asked (like: if you ask, you have something bad in mind).

This is my personal point of view - Fernando may see this different. My favorite after some emails was: We may get a license for less or no money - but we were asking to use it for non-commercial.

Altogether: It was a complete disaster and the current problems, we now have, may not exist if we haven’t ask.

So, again: I would really have fun to use LS and create plugins - but they should have a license which is reliable and not depending on how to ask for using their software - and perhaps of the rating of the person who reads the email.

Regards, Holger

@C0d3man

Mhh that sounds complicated …

Do you think it would help if we all as users of the Zynthian would also ask the linuxsampler devs for giving a non-profit license to the project?
Maybe by starting an online petition? For example like one this website provides: https://www.ipetitions.com/start-petition#

Greetings,
Martin

@lod

I think a petition is not constructive. They have a license and they are using it word by word - that’s their right, no question.

Perhaps they will give a non-profit license. But in my opinion it would be better if they use an existing and clear license which is not contra-productive for other open projects. And perhaps they should not claim everyone who asks, to be a bad guy who wants to avoid their licencse.

I have currently no fun to talk to them. For me this is wasted time. They say Zynthian needs a license and if we bow before them and say the right words perhaps we get one. This is not the way of working on or with Open-Source-Software I used to know.

If someone else has enough diplomatic know-how and has fun in (perhaps endless) discussions: feel free to ask them :smile:.

Regards, Holger

Hi,

I would like to play a modified NiceKeys sf2 in the mod-ui as well.
This one doesn’t work anymore:
git clone -b generic https://github.com/dcoredump/GenericFluidPlug
What options do I have now?

Kind regards,
Markus

Hi @mheidt,

the info is a bit burried in the conversation: Have you installed the following package?
apt-get install -y libipc-system-simple-perl
(This dependency hass been added later)

Greetings,
lod

1 Like

the issue was, that the github project itself was offline yesterday…
BUT.
I updated zynthian and now i have GenericFluidPlug.

Thanks,
Markus