MOD-UI pedal for SFZ input

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

Ok, I could make my own plugin and could use it in a pedalboard.
I get no sound. Other pedalboards get sound.
I read this in the log

DEBUG:root:WS >> mem_load 37.3
DEBUG:root:WS >> param_set /graph/GenericFluidPlug_NiceMarkus :bypass 1.000000
ERROR:root:Parameter Not Found: /graph/GenericFluidPlug_NiceMarkus/:bypass => unorderable types: str() > int()

Hi Markus @mheidt

I also created the NiceKeys plugin with GenericFluidPlug. Works…

How did you got this debug output?

You have created your own soundfont? I think the problem must be located inside the creation of the soundfont. You can try the following:

cd /zynthian/zynthian-sw/GenerichFluidPlug/src
./sflist [PATH_TO_YOUR_SOUNDFONT.SF2]

This should show you all sounds inside the soundfont. if there is no output it is highly possible that the soundfont is broken. Do you have created it with Polyphonie?

Regards, Holger

root@zynthian:/zynthian/zynthian-sw/plugins/GenericFluidPlug/src# ./sflist /zynthian/zynthian-my-data/soundfonts/sf2/NiceMarkus.sf2
0:0 Classic Steinway
0:6 Rhodes Bright
0:12 HS DX7 Rhodes
0:17 HS Wurlitzer
0:19 Harpsichord

I guess, I know the issue…no continuous list.
But FluidSynth works with this soundfont.

Hmmm… don’t think so. I had also tested non-continuous soundfonts - also with several banks: worked.

Regards, Holger

And yes, i used Polyphone…just copy-pasted presets from Nice-Keys-PlusSteinway-JNv2.0.sf2

The error message showed, when I stopped systemctl stop zynthian and restarted it
/zynthian/zynthian-sys/sbin/zynthian.sh

Another thing. When I drag my FluidPlug into the pedalboard, I can’t switch it off.
The red LED flickers once and is on again.

I added more sounds to the soundfont and they weren’t seen by the plugin.
Would be cool, if I don’t have to delete and re-make the plugin in this case.
Is it possible to change the program of the soundfont in the zynthian-ui already?
I could only do it over the web-ui.

Overall, it is very unstable. I could send a log-trace.
But maybe you could add more DEBUG-log messages, because its not very verbose yet.

Besides of this

ERROR:root:Parameter Not Found: /graph/GenericFluidPlug_NiceMarkus/program => unorderable types: str() > int()

I can provide this
INFO:root:LOADING START
DEBUG:root:WS >> size 2560 1156
DEBUG:root:WS >> add_hw_port /graph/playback_1 audio 1 Playback_1 1
DEBUG:root:WS >> add_hw_port /graph/playback_2 audio 1 Playback_2 2
DEBUG:root:WS >> add_hw_port /graph/serial_midi_in midi 0 Serial_MIDI_In 0
DEBUG:root:WS >> add_hw_port /graph/midi_capture_1 midi 0 Ploytec_MIDI_Cable_MIDI_1 1
DEBUG:root:WS >> add_hw_port /graph/serial_midi_out midi 1 Serial_MIDI_Out 0
DEBUG:root:WS >> add_hw_port /graph/midi_playback_1 midi 1 Ploytec_MIDI_Cable_MIDI_1 1
DEBUG:root:WS >> add /graph/GenericFluidPlug_NiceMarkus https://github.com/dcoredump/GenericFluidPlug_NiceMarkus 1152.0 267.6 0
INFO:root:ADD PLUGIN: /graph/GenericFluidPlug_NiceMarkus => https://github.com/dcoredump/GenericFluidPlug_NiceMarkus
DEBUG:root:WS >> param_set /graph/GenericFluidPlug_NiceMarkus level 1.000000
DEBUG:root:WS >> param_set /graph/GenericFluidPlug_NiceMarkus program 0.000000
DEBUG:root:WS >> connect /graph/capture_2 /graph/playback_2
DEBUG:root:WS >> connect /graph/capture_1 /graph/playback_1
DEBUG:root:WS >> connect /graph/serial_midi_in /graph/GenericFluidPlug_NiceMarkus/events
DEBUG:root:WS >> connect /graph/GenericFluidPlug_NiceMarkus/audio_out_l /graph/playback_1
DEBUG:root:WS >> connect /graph/GenericFluidPlug_NiceMarkus/audio_out_r /graph/playback_2
DEBUG:root:WS >> loading_end -1
INFO:root:LOADING END
DEBUG:root:WS >> connect /graph/midi_capture_1 /graph/GenericFluidPlug_NiceMarkus/events
INFO:root:MIDI Chan Selected: 0
INFO:root:Getting Bank List for MOD-UI
DEBUG:root:Add Preset Default
ERROR:root:set_controller_config(3) => ‘NoneType’ object has no attribute 'hide’
ERROR:root:zynthian_gui.zyngine_refresh() => ‘NoneType’ object has no attribute ‘hide’

This is currently not easy to do. I have to think about how to easy load SF2. The problem is not the loading but how to integrate this in MOD-UI and LV2 controllers. If there is a new SF2 the GenericFluidPlug-builder-script analyzes the SF2 and creates a file where the mapping of sound-name to an id is written down. If MOD-UI would have a filebrowser (or perhaps the new Zynthian release will have a parallel interface for uploading data) this can be done in background after uploading…

  • Can you explain exactly what means “unstable”?
  • Unstable for your SF2 or generic unstable?
  • Unstable because of crashing?
  • Can you upload your SF2?
  • What kind of hardware do you use (Raspi/PC)?
  • What kind of audio hardware do you use?

Without much more information it is difficult for me to debug…

I have absolute no problems with SF2 from external sources and our own (Polyphonie-)SF2 files. But I must say: I am using “normal” Zynthian hardware (Raspi, Hifiberry)…

As I wrote before: I have only created a script and some small changes for the generic part around the oroginal FluidPlug-LV2-plugin - the debug code is mainly from MOD-UI and not from the plugin itself.

Regards, Holger