SFZ - requisites

Hello

I’m trying to install some SFZ files, but it’s hard to understand the Zynthian requirements.

For example I couldn’t play Salamander 24bit48kHz regardless of whether the samples are in .flac or WAV, Linuxsampler simply crashes and I have to restart Zynthian.
I also tried installing Production Voices’ free SFZ, Electric V LE and StateGrandLE, tried editing in various ways, even turning all .flac to .wav. But I couldn’t play, simply Linuxsampler crashes and I have to restart Zynthian too.
But I managed to install a 24bit44kHz upright piano with FLAC samples without having to make any adjustments.

Is there any table of requirements that SFZ needs to meet to run properly on Zynthian?

Grateful

Oh yes, the rabbit hole of why a sfz refuses to run on zynthian …

First of all it’s is not zynthians problem per se, but the problem of the included sfz samplers linuxsampler and sfizz (always try both on a new sfz)

Then - depending on the RasPi you have and its RAM size - you have to keep an eye on the size of the sfz. (although both sfizz and linuxsampler should support dynamic loading of samples afaik)

Finally it boils down to sfz not being a really controlled standard, which opcodes a sampler supports and for which sampler a sfz was originally developed (the sfzformat website has a good overview). Me personally have always hesitated to deep dive into writing sfz files but perhaps someone else here can help you out.

Most recent sfz (e.g. the stuff you find on pianobook) seem to be optimized for sforzando - which is a great sampler with full v1 and v2 opcode support plus its own ARIA extensions - but unfortunately doesn’t run on Linux (otherwise it would certainly be included in zynthian)

Regarding the Salamander Piano: have you tried the sfz which comes with your zynthian installation? Normally this should run quite well.

The Production Voices instruments are obviously optimized for sforzando.

But after all, if you are after a good sounding piano your best bet is buying a Pianoteq licence!

3 Likes

I don’t see this as a problem, but as a feature, that’s why I asked what the prerequisites would be to build an SFZ compliant with the existing sample-players in Zynthian.

My PI has 4G of RAM, in my tests I keep an “htop” open and keep track of it, my RAM consumption never exceeded 30%.

It’s precisely because SFZ is not a “controlled pattern” that I asked what the prerequisites would be to create an SFZ that runs well on Zynthian.

I don’t have Windows computers, I’m 100% linux on all my devices since 2008. I tested Sforzando in a friend’s studio and I really liked it, but I think that linuxsampler and sfizz do a good job.

I love the Salamander Piano that comes with Zynthian, but it’s 16bit/44.1kHz. I wanted to test the 24bit/48kHz version. Today I intend to test another older version that I found in this definition.

I agree, but the samples and .sfz files are available and they are relatively easy to edit, maybe with some tweaking I can get them to run correctly, so I asked what the prerequisites would be, so that I could guide myself and edit correctly.

I have Pianoteq studio license and I have 4 piano packs, I have “Steinway D”, “U4”, “YC5” and “Petrof”.

The issue is not piano timbre per se, I just want to learn how to make good SFZ for Zynthian, and I decided to start my studies using piano SFZ because they are complex, after all they have different samples for just one note, for example key noise joints, key release joints, pedal sound joints and so on.

Thank you very much in advance.

2 Likes

Hi @Jeremias !

As @mbvs commented above, the requisites are the requisites of linuxsampler or sfizz. In their project pages you will find the list of supported opcodes and features.

I doubt memory is going to be a problem because both players implement dynamic loading of samples. As you noted, it’s difficult to go above 30-40% of memory usage on zynthian :wink:

The best!

2 Likes

Seems I totally underestimated your endeavour - sorry for that - if you come up with something please share it here, I would be very interested. But it seems that you are the one who has to come up with such a requirements table for sfz in zynthian.

2 Likes

hi @Jeremias,
I have a similar motivation. I was trying to modify some sfz files for use with the wind controller. And to make zynthian for players on EWI (and EVI) plug and play devices. Unfortunately, this requires a deeper knowledge of the sfz format than I currently have. Most of the tricks for the dynamics of sounds are based on the technique of playing the keyboard and not on the support of the breath source (CC2). It’s natural because keyboardists make up the majority of users (but one day it will be different :slight_smile: )

Even so, I hope you will share your knowledge, procedures for editing sfz files, or results.

2 Likes

Hi All! Here are some SFZ tips.

Rule 1: Download a fresh Zynthian image.

This usually fixes crashes.

Rule 2: Start simple.

Download to your desktop a few sfz files from /zynthian/zynthian-data/soundfonts/sfz/

You can also download a zip file from zynthian.local Library Presets and Soundfonts.

Start with /Brass/SynthBrass.
Open the sfz in a text editor and study the arrangement of the opcodes.
You will see master, global, group, region and sample.

At the master, global or group level:

Add pitch LFO. Assign CC1 to pitch lfo:

pitchlfo_freq=8.176
pitchlfo_depth=0
pitchlfo_depth_oncc1=200

Assign CC 74 to filter cutoff

fil_type=lpf_4p
cutoff=2400
cutoff_cc74=9600

Add velocity to volume

Amp_veltrack=65

Save the sfz file with a new name, in the same folder as the wav files.

Copy the folder to /zynthian/zynthian-my-data/soundfonts/sfz/

Test your edits, keep editing until you are happy with the response.

You can also use the desktop version of Sfizz to test your edits.

Rule 3: Now look at multiple velocity levels

Download the /Pianos/Salamander or Stereo Rhodes

You might find samples grouped by velocity (1-63, 64-95, 96-115, 116-127).

Or you might find sample grouped by key range (G#3-A#3, B3-C#4,D4-E4).

Arrange the regions based on your needs (splits or velocity switches).

You can apply vibrato, filter, LFO at the global, group, region or sample level.

Rule 4: Now look at Unison, Legato, WAV vs FLAC

Legato uses multiple groups and turns them on and off.

Unison involves duplication, transposition and detuning.

Use the WAV format first, because it just works.

Consider FLAC if you have lots of samples and need to save space .

Rule 5: Test the Opcodes

Some work in Linuxsampler, others work differently in Sfizz.

Some don’t work in either…

Be patient as you learn what works.

Hope this helps!
Sam in NJ USA

4 Likes

My final tip:

6: Use a Helper Utility

Chicken Systems Translator Pro and Autosampler

https://www.chickensys.com/products2/translator/index.html

Pricey, but seamlessly converts from many formats.
I use the Autosampler utility to create multi velocity Kontakt 5 instruments,
I then convert the NKI to SF2, SFZ and EXS
Works every time, doesn’t work with proprietary compressed formats

Logic Pro or MainStage Auto Sampler AU

https://www.apple.com/logic-pro/
https://www.apple.com/mainstage/

I use MainStage Auto Sampler  when I need specific velocities
I then convert the EXS file and samples to Kontakt 5 and SFZ
Has a nice gain adjust feature to prevent clipping

Bjoerns Sample Tools, Sample Mapper, EXS2SFZ

https://www.bjoernbojahr.de

I have not tried these yet, but he made some nice preset sounds
and the Mapper, looper, calculator and EXS2SFZ converter look like time savers

Akai MPC Beats Auto Sampler

https://www.akaipro.com/mpc-beats

There are several Youtube videos that show you how to use their free Auto Sampler

psobot SampleScanner for Linux

https://github.com/psobot/SampleScanner

iI have not tested this either, but it is a command line SFZ recorder and generator

Polyphone

        https://www.polyphone-soundfonts.com/

        Build, edit and save sf2 or sfz format files

Or Use the manual method:

Make a 100 bpm midi file that 
Plays each note for 6 seconds,
Followed by two seconds of silence, 
Record the the audio Using Adacity
	https://www.audacityteam.org
Then chop up and loop the audio file using WavePad Free License
	https://www.nch.com.au/index.html
Finally build your sfz file using a text editor		

Try these out and let us know!

Sam in NJ USA

4 Likes