Sfizz Integration

Hi,

I’d be interested in the integration of Sfizz SFZ player as it can play SFZ files that linux sampler cannot.

I was able to buid it from source on my zynthian and access the LV2 plugin on MOD-UI; however, I wasn’t able to load a SFZ file…

It would be perfect to have a Sfizz engine, like the fluid engine, and I’m ready to try to develop it; however I would need a more step-by-step guide than the one on the wiki.

Any guidance on how to properly run this LV2 on Zynthian or on developing an engine for it?

Thanks

I vaguely remember trying sfizz and getting the same problem so I ditched it. I think you’d need a specific lv2 preset for each sfz you want to load in. Either sfizz didn’t work with jalv.gtk to save the lv2 preset, or there was something else, I can’t remember.

Is there any particular reason you want to use sfizz over linuxsampler? The only real advantages I know is it’s properly lv2 so works better in DAWs, which isn’t really relevant here, and it’s not under a weird free but non-free licence, which hasn’t caused much of a problem yet.

Regarding Sfizz, there is a standalone jack client that could be integrated as a zynthian engine. I didn’t test it yet, but it seems promising. Development is very dynamic. Take a look to the commit list:

https://github.com/sfztools/sfizz/commits/develop


Regarding LinuxSampler and the reasons to look for something better, you should read this thread from the Debian mail archives about the Linuxsampler license:

https://lists.debian.org/debian-legal/2005/09/msg00268.html

Resuming: Some people from Debian (and also from other well known distributions) think that Linuxsampler license is “inconsistent”, and because of this reason you can’t find Linuxsampler in any mainstream Linux distribution or repository.

Regarding development workflow itself, they use Subversion (a prehistoric tool from my POW) and mail-lists:

https://svn.linuxsampler.org/cgi-bin/viewvc.cgi/

(observe the sloooow development)

They also have a closed/private bugzilla:

https://bugs.linuxsampler.org/cgi-bin/createaccount.cgi

IMHO, they are blocked in the past and LS development is constrained by this state of things:

  • Linuxsampler’s code can’t be “mixed” or “derived” because of the inconsistent license
  • New developers can’t contribute to the project because development is not really open. I mean, you can’t fork the repo fix a bug and make a pull request. You can’t open an issue in tracker system because it’s closed, etc.
  • New users can’t start using LS easily because it’s not available in main distro repos.

Less freedom, less developers, less users, less feedback, less project, … it’s a vicious circle.

I’m afraid they are killing/limiting the project, but of course, they can do what they want. It’s their right.

So … yes … i think we have very good reasons to look for alternatives to LinuxSampler.
And we really would like to have a better SFZ support :wink:

Regards!

2 Likes

You know, I didn’t realise there was a standalone. I thought it was plug in only. I’ll have a play (now I know how to cobble together a terrible engine).

What do you think about Plogue Sforzando?

I have been using Subversion recently because the project I moved on to are using it for some of their version control I hanker after the simplicity of Subversion and swear a lot less at it than git.

I don’t know because i never used it. It’s not available for Linux and source code is closed. It’s not free as in freedom, just free as in “free beer”. It’s proprietary software.

I have no problems with proprietary software (although i prefer free software), but i don’t like windows nor mac. I’m a pure Linux user :wink:

Anyway, if Sforzando was available for Linux & RBPi, i wouldn’t have any problem on integrating with zynthian, but i’m afraid we wont see this any time soon.

Thanks for your reply.

I would be interested in integrate the standalone version of sfizz as an engine. However I would require a more step by step guide than the one existing in thé wiki. Does a detailled guide existe?

I agree that git is harder to understand, but it “maps” very well the open source development worflow. Git was designed with this on mind. Subversion can be fine for developing on a closed team, but git paved the way for developing workflows that we didn’t dream before. Github, gitlab, etc. didn’t exist before git …

Regards

No. You have to take an existing engine as a base. Getting a working engine is not so difficult. Evil is in the details …

Have a look at this Pull Request I mangled together, should help you figure out what I had to fiddle with to get a new engine off the ground.

Thanks Baggypants,

I’ve begun to look at your commits.

Thank you for your help

1 Like

Hi!
@Baggypants : I’ve tried to develop an engine based on the pull request you made for the radio, but with no result yet… :frowning:
More specifically:

  • I created an engine file : zyngine/zynthian_engine_sfizz.py based on the fluidsynth file
  • I modified the zyngine/init.py
  • I also modified the zyngui/zynthian_gui_engine.py

The engine does not appear in the web interface (advanced view) nor in the zynthian layer…

Am I on a good track? What can be wrong?

Thanks

I don’t know, Which is your repo?

Hello,

I’ve made some (small) progress with the integration of Sfizz :wink:

The Sfizz engine appears into the engine list, I can assign a midi channel, the bank list of SFZ files appears… but freeze at this point.

I tried to select a bank into another engine (ex: Linux Sampler) but the screen freezes to at this point.

Any idea of what can cause this issue?

Thanks

2 Likes

The logs, please … :wink:

How are you testing your code? You should be running the zynthian UI from command line.

First, you have to stop the zynthian service like this:

systemctl stop zynthian

Then you run the zynthian-ui like this:

zynthian.sh

So, you can see the debug log in real time and break the execution with ctrl-c.

Regards,

Here we go:

  • I dont know if it’s related, but this error message keep showing up:

    ERROR:zynthian_gui: ‘NoneType’ object has no attribute ‘getPeak’
    Traceback (most recent call last):
    File “./zynthian_gui.py”, line 1262, in refresh_status
    self.status_info[‘peakA’] = lib_jackpeak.getPeak(0)

  • Concerning the bank list

    DEBUG:zynthian_layer: BANK LIST =>
    [[’/zynthian/zynthian-data/soundfonts/sfz/Bass’, 0, ‘Bass’, ‘’, ‘Bass’], [’/zynthian/zynthian-data/soundfonts/sfz/Brass’, 1, ‘Brass’, '’, ‘Brass’], [’/zynthian/zynthian-data/soundfonts/sfz/Drum Machines’, 2, ‘Drum Machines’, ‘’, ‘Drum Machines’], [’/zynthian/zynthian-data/soundfonts/sfz/Drums’, 3, ‘Drums’, '’, ‘Drums’], [’/zynthian/zynthian-data/soundfonts/sfz/Ethnic’, 4, ‘Ethnic’, ‘’, ‘Ethnic’], [’/zynthian/zynthian-data/soundfonts/sfz/Guitars’, 5, ‘Guitars’, '’, ‘Guitars’], [’/zynthian/zynthian-data/soundfonts/sfz/Organs’, 6, ‘Organs’, ‘’, ‘Organs’], [’/zynthian/zynthian-data/soundfonts/sfz/Other’, 7, ‘Other’, '’, ‘Other’], [’/zynthian/zynthian-data/soundfonts/sfz/Percussion’, 8, ‘Percussion’, ‘’, ‘Percussion’], [’/zynthian/zynthian-data/soundfonts/sfz/Pianos’, 9, ‘Pianos’, '’, ‘Pianos’], [’/zynthian/zynthian-data/soundfonts/sfz/Strings’, 10, ‘Strings’, ‘’, ‘Strings’], [’/zynthian/zynthian-data/soundfonts/sfz/Synths’, 11, ‘Synths’, '’, ‘Synths’], [’/zynthian/zynthian-data/soundfonts/sfz/Woodwinds’, 12, ‘Woodwinds’, ‘_’, ‘Woodwinds’]]
    DEBUG:zynthian_gui_controller: ZCTRL ‘Bank’: 0 (0 -> 13), None, None

A more complete extract of the logs

INFO:zynthian_gui: Short Switch 3
DEBUG:zynthian_layer: BANK LIST => 
[['/zynthian/zynthian-data/soundfonts/sfz/Bass', 0, 'Bass', '_', 'Bass'], ['/zynthian/zynthian-data/soundfonts/sfz/Brass', 1, 'Brass', '_', 'Brass'], ['/zynthian/zynthian-data/soundfonts/sfz/Drum Machines', 2, 'Drum Machines', '_', 'Drum Machines'], ['/zynthian/zynthian-data/soundfonts/sfz/Drums', 3, 'Drums', '_', 'Drums'], ['/zynthian/zynthian-data/soundfonts/sfz/Ethnic', 4, 'Ethnic', '_', 'Ethnic'], ['/zynthian/zynthian-data/soundfonts/sfz/Guitars', 5, 'Guitars', '_', 'Guitars'], ['/zynthian/zynthian-data/soundfonts/sfz/Organs', 6, 'Organs', '_', 'Organs'], ['/zynthian/zynthian-data/soundfonts/sfz/Other', 7, 'Other', '_', 'Other'], ['/zynthian/zynthian-data/soundfonts/sfz/Percussion', 8, 'Percussion', '_', 'Percussion'], ['/zynthian/zynthian-data/soundfonts/sfz/Pianos', 9, 'Pianos', '_', 'Pianos'], ['/zynthian/zynthian-data/soundfonts/sfz/Strings', 10, 'Strings', '_', 'Strings'], ['/zynthian/zynthian-data/soundfonts/sfz/Synths', 11, 'Synths', '_', 'Synths'], ['/zynthian/zynthian-data/soundfonts/sfz/Woodwinds', 12, 'Woodwinds', '_', 'Woodwinds']]
INFO:zynthian_gui: MIDI SWITCHES SETUP...
DEBUG:zynthian_gui_bank: BANK INDEX => 0
ERROR:zynthian_gui: 'NoneType' object has no attribute 'getPeak'
Traceback (most recent call last):
  File "./zynthian_gui.py", line 1262, in refresh_status
    self.status_info['peakA'] = lib_jackpeak.getPeak(0)
AttributeError: 'NoneType' object has no attribute 'getPeak'
DEBUG:zynthian_layer: BANK LIST => 
[['/zynthian/zynthian-data/soundfonts/sfz/Bass', 0, 'Bass', '_', 'Bass'], ['/zynthian/zynthian-data/soundfonts/sfz/Brass', 1, 'Brass', '_', 'Brass'], ['/zynthian/zynthian-data/soundfonts/sfz/Drum Machines', 2, 'Drum Machines', '_', 'Drum Machines'], ['/zynthian/zynthian-data/soundfonts/sfz/Drums', 3, 'Drums', '_', 'Drums'], ['/zynthian/zynthian-data/soundfonts/sfz/Ethnic', 4, 'Ethnic', '_', 'Ethnic'], ['/zynthian/zynthian-data/soundfonts/sfz/Guitars', 5, 'Guitars', '_', 'Guitars'], ['/zynthian/zynthian-data/soundfonts/sfz/Organs', 6, 'Organs', '_', 'Organs'], ['/zynthian/zynthian-data/soundfonts/sfz/Other', 7, 'Other', '_', 'Other'], ['/zynthian/zynthian-data/soundfonts/sfz/Percussion', 8, 'Percussion', '_', 'Percussion'], ['/zynthian/zynthian-data/soundfonts/sfz/Pianos', 9, 'Pianos', '_', 'Pianos'], ['/zynthian/zynthian-data/soundfonts/sfz/Strings', 10, 'Strings', '_', 'Strings'], ['/zynthian/zynthian-data/soundfonts/sfz/Synths', 11, 'Synths', '_', 'Synths'], ['/zynthian/zynthian-data/soundfonts/sfz/Woodwinds', 12, 'Woodwinds', '_', 'Woodwinds']]
DEBUG:zynthian_gui_controller: ZCTRL 'Bank': 0 (0 -> 13), None, None

Are you using a code repository? like github or gitlab?
I think the linuxsampler engine has a function to test if the osc port is listening. I wonder if that is causing it to stall?

Yes, I use this repo: https://github.com/pierre-girbon/zynthian-ui.git

It seems to me that the error is generic to the current master branch of zynthian-ui

1 Like