Sfz vst SFZero

All your LV2 and LADSPA goodness and more.

Moderators: MattKingUSA, khz

Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Sfz vst SFZero

Post by Lyberta »

ubuntuuser wrote:What Debian version do you have?
Debian Testing. Here the output of "ldd SFZero.so":

Code: Select all

	linux-vdso.so.1 (0x00007ffe3613e000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fed510cb000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fed50eb3000)
	libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007fed50ba3000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed5099b000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fed506e3000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed504c3000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fed502bb000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed4ff3b000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed4fc33000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed4fa1b000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed4f67b000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fed4f453000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fed51e03000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fed4f233000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fed4effb000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fed4edf3000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fed4ebeb000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fed4e9d3000)
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: Sfz vst SFZero

Post by ubuntuuser »

Lyberta wrote:
ubuntuuser wrote:What Debian version do you have?
Debian Testing. Here the output of "ldd SFZero.so":

Code: Select all

	linux-vdso.so.1 (0x00007ffe3613e000)
	libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007fed510cb000)
	libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007fed50eb3000)
	libasound.so.2 => /usr/lib/x86_64-linux-gnu/libasound.so.2 (0x00007fed50ba3000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fed5099b000)
	libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fed506e3000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fed504c3000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fed502bb000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fed4ff3b000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fed4fc33000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fed4fa1b000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fed4f67b000)
	libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fed4f453000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fed51e03000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fed4f233000)
	libpng16.so.16 => /usr/lib/x86_64-linux-gnu/libpng16.so.16 (0x00007fed4effb000)
	libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fed4edf3000)
	libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fed4ebeb000)
	libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fed4e9d3000)

Try SFZero.zip at https://github.com/osxmidi/SFZero/releases

It was made on Debian 9
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: Sfz vst SFZero

Post by ubuntuuser »

There is a JUCE Linux install script here https://forum.juce.com/t/easy-juce-inst ... 6-04/18159 which is quite good but I ran into a clang/g++ -nopie -no-pie issue (unrecognized command line option '-nopie' clang)

Change the script lines

export CC=/usr/bin/clang
export CXX=/usr/bin/clang++

to

export CC=/usr/bin/gcc
export CXX=/usr/bin/g++

I had to install

sudo apt-get install git

sudo apt-get install build-essential

sudo apt-get install pkg-config

sudo apt-get install webkit2gtk-4.0

Run the script

Unzip SFZero-master.zip and place in the /home/user/JUCE folder

Unzip SFZeroModule-master and rename the folder SFZero and place in the /home/user/JUCE/modules folder

I had to enable GPL mode which needs a rebuild of Projucer

/home/user/JUCE/extras/Projucer/JuceLibraryCode/AppConfig.h

#define JUCER_ENABLE_GPL_MODE 1

and then rebuild Projucer

cd /home/user/JUCE/extras/Projucer/Builds/LinuxMakefile

make

and then move Projucer to the /home/user/JUCE folder and run it

Copy the /home/user/SDKs/VST3 SDK contents to /home/user/JUCE/SFZero-master/SDKs/vstsdk2.4 or change the VST SDK path to /home/user/SDKs/VST3 SDK

Change all of the module paths to /home/user/JUCE/modules

Save

cd /home/user/JUCE/SFZero-master/plugin/Builds/Linux

make CONFIG=Release
Last edited by ubuntuuser on Fri Nov 24, 2017 7:39 am, edited 5 times in total.
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Sfz vst SFZero

Post by Lyberta »

Ok it loads. Now there's an interesting GUI bug.
Attachments
Screenshot at 2017-11-24 05-42-34.png
Screenshot at 2017-11-24 05-42-34.png (230.63 KiB) Viewed 1384 times
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: Sfz vst SFZero

Post by ubuntuuser »

Lyberta wrote:Ok it loads. Now there's an interesting GUI bug.
Seems like that one still had the JUCE filechooser quirk, but I wasn't sure if it mattered on the Stretch version.

I've remade it and called it SFZero-Stretch.zip https://github.com/osxmidi/SFZero/releases

If this one doesn't work then it might have to be built for your system using my instructions above.

Also, this JUCE version seems to need webkit in some way, so that might be needed.
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: Sfz vst SFZero

Post by ubuntuuser »

falkTX wrote:I should add this to the distrho-ports repo to make it easier for everyone...
(plus we get LV2 out of it as well)

Thing is, we need to look for which specific SFZero package to include.
There are 3 versions at the moment.
https://github.com/stevefolta/SFZero
https://github.com/schellingb/SFZero
https://github.com/jamiebullock/SFZero
(the main author recommends to stay away from altalogix fork)

If we don't join the code, we end up losing some commits like:
https://github.com/schellingb/SFZero/co ... 9ca4bf868c
https://github.com/jamiebullock/SFZero/ ... 3a7f03186e
https://github.com/jamiebullock/SFZero/ ... e3ea8a96df

I'd rather have a central project which includes all of these.
I opened a ticket for this now https://github.com/stevefolta/SFZero/issues/3

Yes.

The other thing is disk streaming, and there are some Juce classes https://github.com/christophhart/streaming_sampler already around for it but I havn't gone into depth with them about how something like that could be integrated.

I havn't done disk streaming code since I worked on a mp3 player ages ago and I don't know much about Juce classes.
Last edited by ubuntuuser on Fri Nov 24, 2017 9:41 am, edited 3 times in total.
ubuntuuser
Established Member
Posts: 315
Joined: Mon Jan 02, 2017 9:46 am
Has thanked: 1 time
Been thanked: 5 times

Re: Sfz vst SFZero

Post by ubuntuuser »

falkTX wrote:
ubuntuuser wrote:The other thing is disk streaming, and there are some Juce classes already around for it but I havn't gone into depth with them.
I think that is a completely different matter.
Implementing disk streaming is not an easy task. Specially when you have realtime audio and multiple voices, that can play randomly..
A proper implementation takes time, specially the final polishing. You can try to just throw a class at it, but you might end up worse than before...

On a different note, please please try to learn how to use git commits.
Deleting everything and re-uploading files via github is very ugly.
Not to mention impossible to see what actually changed... it takes out the whole point of using git in the first place.
Thanks.

From what I can pick up

For a Midi note

Synthesiser::noteOn is called then juice::Synthesiser assigns one of the Synth Voice objects to play the note and calls that object's StartNote

SFZero has a noteOn routine that the author thinks can be used to start full sample loading via a background thread.

The Juce streaming classes seem to use StartNote to start full sample loading via a background thread.

Seeing that NoteOn and StartNote seem to be connected, I don't think it's that hard to integrate the Juce disk streaming classes.

It seems that all of the samples are partially loaded at startup, and then StartNote starts a particular samples full load.

There are multiple SFZero and Juce streaming classes renderNextBlock routines that would need to be integrated somehow.


From the comments section

readSamples() - limit loading to first blocksize number of samples

Something needs to trigger the reading of the full sample. I suppose this should be in sfzero::Synth::noteOn() where we could submit an asynchronous loading of the full sample into a temporary buffer. Then when sfzero::Voice::renderNextBlock() (where I understand the bulk of the rendering is done) reaches the end of it's pre-cached block, it could look at the temporary full-sample buffer.

Does this sound the best way?

There isn't currently an appropriate thread to do the background reading; you'll have to add one. noteOn() would send it a message of some kind to initiate the loading. Once the thread has read it, it would install it in the SFZSound (with appropriate mutex locking).

------

That seems to be very similar to what the Juce disk streaming classes are doing.

But what I'm saying could be totaly wrong because I havn't gone into it with any depth.

Github was a mess and I think I've sorted it out and will be maintaining it in a more orderly way.
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Sfz vst SFZero

Post by Lyberta »

falkTX wrote:I should add this to the distrho-ports repo to make it easier for everyone...
(plus we get LV2 out of it as well)

Thing is, we need to look for which specific SFZero package to include.
There are 3 versions at the moment.
https://github.com/stevefolta/SFZero
https://github.com/schellingb/SFZero
https://github.com/jamiebullock/SFZero
(the main author recommends to stay away from altalogix fork)

If we don't join the code, we end up losing some commits like:
https://github.com/schellingb/SFZero/co ... 9ca4bf868c
https://github.com/jamiebullock/SFZero/ ... 3a7f03186e
https://github.com/jamiebullock/SFZero/ ... e3ea8a96df

I'd rather have a central project which includes all of these.
I opened a ticket for this now https://github.com/stevefolta/SFZero/issues/3
I think one of the great things to do would be making 100% FOSS SFZ library.
User avatar
Michael Willis
Established Member
Posts: 1451
Joined: Mon Oct 03, 2016 3:27 pm
Location: Rocky Mountains, North America
Has thanked: 69 times
Been thanked: 164 times
Contact:

Re: Sfz vst SFZero

Post by Michael Willis »

falkTX wrote:Implementing disk streaming is not an easy task.
How necessary is disk streaming? In these days with gigabytes of memory, even my rather heavyweight orchestra template only uses a rather small fraction of my system memory to store all of the samples. What if we just punt on disk streaming; for anybody that really needs it, we can point then to Linuxsampler.

I'm willing to contribute code to this project; I imagine it being an alternative to the venerable Linuxsampler with a nicer user experience. I think for me, getting better coverage of sfz opcodes would be higher priority than disk streaming.
Lyberta wrote: I think one of the great things to do would be making 100% FOSS SFZ library.
I'm honestly not trolling, just trying to understand here. Based on history, you clearly have a more stringent definition of what qualifies as "free" software than some other people here, could you clarify what you mean by 100%? It seems like your major problem with Linuxsampler is the restriction against commercial usage. Is that correct? If I understand right, that's one reason why Ardour doesn't come with a SFZ sampler built in, since it is a somewhat commercial project.
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Sfz vst SFZero

Post by Lyberta »

Michael Willis wrote:could you clarify what you mean by 100%?
I've added 100% to denote that it would actually quality as FOSS under a free software and open source software definitions. We have people like falkTX who consider LinuxSampler not to be proprietary.
Baggypants
Established Member
Posts: 188
Joined: Fri Jul 31, 2015 11:28 pm
Has thanked: 14 times
Been thanked: 8 times

Re: Sfz vst SFZero

Post by Baggypants »

For further reading on the definitions of free software and open source, see: https://www.gnu.org/philosophy/open-sou ... point.html
nils
Established Member
Posts: 537
Joined: Wed Oct 22, 2008 9:05 pm
Has thanked: 35 times
Been thanked: 94 times
Contact:

Re: Sfz vst SFZero

Post by nils »

Baggypants wrote:For further reading on the definitions of free software and open source, see: https://www.gnu.org/philosophy/open-sou ... point.html
Or even better: For everyday conversations the majority of people just say "Open Source" and mean something like GPL, BSD or MIT licenses.
finotti
Established Member
Posts: 528
Joined: Thu Sep 01, 2011 9:07 pm
Has thanked: 86 times
Been thanked: 23 times

Re: Sfz vst SFZero

Post by finotti »

I'd just like to report that it is working great in Debian Sid (with KXStudios Repositories) and thank the author.

In particular, it works with Karoryfer's Fashion Bass which I could not get to work with LinuxSampler.

Thanks again for the plugin!
Baggypants
Established Member
Posts: 188
Joined: Fri Jul 31, 2015 11:28 pm
Has thanked: 14 times
Been thanked: 8 times

Re: Sfz vst SFZero

Post by Baggypants »

nilshi wrote:
Baggypants wrote:For further reading on the definitions of free software and open source, see: https://www.gnu.org/philosophy/open-sou ... point.html
Or even better: For everyday conversations the majority of people just say "Open Source" and mean something like GPL, BSD or MIT licenses.
<big air quotes>Better</big air quotes>
Lyberta
Established Member
Posts: 681
Joined: Sat Nov 01, 2014 8:15 pm
Location: The Internet
Been thanked: 1 time

Re: Sfz vst SFZero

Post by Lyberta »

nilshi wrote:Or even better: For everyday conversations the majority of people just say "Open Source" and mean something like GPL, BSD or MIT licenses.
I sometimes prefer the word "libre" because it is harder to be misunderstood.
Post Reply