Feature requests: sfz/sfizz

Hi there! I recently tried to align my sfz files for use with Zynthian and thought, that some more control screens would be cool. I found the corresponding lines in zynthian_engine_sfizz.py and thought about another layout which would look like this:

    # ---------------------------------------------------------------------------
    # Controllers & Screens
    # ---------------------------------------------------------------------------

    # SFZ Default MIDI Controllers (modulators)
    _ctrls = [
        ['modulation wheel', 1, 0],
        ['volume', 7, 127], 
        # default to 127 to match sfz loudness to synth processors, assuming 
        # sfz creators prevent clipping at vol. 127
        ['pan', 10, 64],
        ['expression', 11, 127],

        ['env. attack', {'value': 64, 'midi_cc': 73, 'envelope': 'attack'}],
        ['env. decay', {'value': 64, 'midi_cc': 75, 'envelope': 'decay'}], 
        # having complete ADSR seems nice.
        ['env. sustain', {'value': 64, 'midi_cc': 79, 'envelope': 'sustain'}], 
        # like above. CC debatable, not in MIDI reference, but that is how Arturia 
        # for example handles this
        ['env. release', {'value': 64, 'midi_cc': 72, 'envelope': 'release'}]

        ['filter cutoff', 74, 127],
        # should default to open filter
        ['filter resonance', 71, 0], 
        # should default to no resonance
        ['lfo rate', 76, 64],
        # can call that lfo or vibrato, which might be more suitable for sfz 
        # real world instruments. Can control vibrato if modwheel occupied by
        # dynamic crossfading
        ['lfo depth', 77, 0],
        # like above, default to no modulation

        ['sustain', 64, 'off', ['off', 'on']],
        ['sostenuto', 66, 'off', ['off', 'on']],
        ['legato', 68, 'off', ['off', 'on']],
        ['breath', 2, 127],

        ['portamento on/off', 65, 'off', ['off', 'on']],
        ['portamento time-coarse', 5, 0],
        ['portamento time-fine', 37, 0],
        ['portamento amount', 84, 0], 
        # because why not

        ['reverb', 91, 0],
        # not sure if sfizz handles these. otherwise: default to zero send level
        ['tremolo', 92, 0], 
        ['chorus', 93, 0], 
        ['phaser', 95, 0], 
    ]

    # Controller Screens
    _ctrl_screens = [
        ['main', ['volume', 'pan', 'modulation wheel', 'expression']],
        ['envelope', ['env. attack', 'env. decay',
                             'env. sustain', 'env. release']]
        ['filter/lfo', ['filter cutoff', 'filter resonance',
                             'lfo rate', 'lfo depth']]
        ['pedals', ['legato', 'breath', 'sostenuto', 'sustain']],
        ['portamento', ['portamento on/off',
                        'portamento time-coarse', 'portamento time-fine', 'portamento amount']],
        ['effects', ['reverb', 'tremolo', 'chorus', 'phaser']],
    ]

Edit: Here is the above mentioned in human readable form:

main: volume, pan, modulation wheel, expression
envelope: env. attack, env. decay, env. sustain, env. release
filter/lfo: filter cutoff, filter resonance, lfo rate, lfo depth
pedals: legato, breath, sostenuto, sustain
portamento: portamento on/off, portamento time-coarse, portamento time-fine, portamento amount
effects: reverb, tremolo, chorus, phaser

It mainly completes the ADSR (I also did not differentiate between filter and amp envelopes, because it’s soundfonts and is not in the MIDI reference anyway.) and LFO controls which could be and are sometimes used for vibrato controls. I also added some effects, but I actually don’t know if sfizz even handles them.

While I am here already, I just want to leave some thoughts about sfz handling I had:

  • What would be great: A small info panel containing either each sfz’s readme.$ext or a specific “zyninfo.txt”, which might contain a short soundfont info and usable cc and keyswitches which shows in the preset menu and on the chain control screen. (could apply to synth chain screens as well). It could look like this:
Soprano recorder sampled from my childhood with stereo [brand] microphones in my garage by [creator]. Very bright sounding.

Keyswitches:
C0 = Poly Sustain
C#0 = Mono Legato
D#0 = Just slamming it on the floor

Controls:
CC74 = Cutoff
...
  • Maybe a next/previous preset control on the chain control screen (could apply to synth chain screens as well).
  • Like somebody mentioned before already, I wonder how soundfonts are ordered. If possible, a case insensitive alphabetical order would be great, because this can be edited by the end user straight forward.

What do you think about these?

1 Like

Now that we have paved the way, it’s easy to implement this kind of things.
Please, add a feature request in our tracking system :wink:

I just fixed preset list order for sfizz and linuxsampler (vangelis branch)

Could you elaborate a little bit more about this?

1 Like

Regarding the extra controllers, let me think about it. You may better create a feature request or yet better, a pull request in github.

Thanks!

1 Like

I’ll rather do a feature request since I do not speak git fluently. Unfortunately I cannot test things on the vangelis branch yet because when I tried to checkout these lately it booted to software error, I was unable to connect to webconf and also to fix these things because of my limited understanding and consequently reflashed the image.

I elaborate about the next/previous preset controls: It might be just handy to just have a button for next/previous preset because it would be much easier to navigate though sounds that going back to the preset menu, scroll thorugh the list and select the next in the row. It would be just 1 instead of 3 steps.

If you enable “Note-On Preset Preload” in the Admin menu then you can audition sounds directly in the preset menu. Each preset is temporarily loaded when it is highlighted and a MIDI note is received. It may take a short while for the sound to load so invariably requires a couple of MIDI notes before the sound is auditoned. The reason for this delay will likely be a challenge to implementing a prev/next preset option in the control view.

Thanks, I didn’t find this until today and will try that at home. Though I wonder how this works with pure touch input where I select presets directly by touch input. Otherwise with the new v5 touch buttons it might work.

I also expect some loading time when next/previous preset buttons would be present, but honestly that’s the same with Sforzando or Kontakt’s next/previous preset buttons as well as with the current preset screen → scrolling → loading behaviour.

You are right that touch doesn’t play well with the preselection auditioning. I haven’t yet thought of a way to handle that.

You can also disable “Program Change for ZS3” in the Admin menu afterwhich, MIDI program change will select the presets of an engine, so you can use your MIDI controller progam select up/down to step through sfz sounds.

[Edit] It is only 2 taps on a touchscreen to select a preset:

  • Tap “Preset” button
  • Tap the required preset (after dragging the list to find the required one)

I think this is an acceptable workflow for touch. We do unfortunately have to have some compromises for different UIs.

Although I consider swiping as a more meaningful evolutionary action of animals than tapping on things, I counted that as the third action. Though I agree that this is totally acceptable. I evaluate the program change functionality, which are anyhow not present on all controllers. I thought having that on screen would be more straight forward, something like
01 DX7 → [<PREV] 02 Rhodes Piano [NEXT>] ← 03 Wurli

I meanwhile created the feature requests for the other two ideas.

Btw: It is really great and enjoyable how responsive and active you and this project are and how open for changes. Thank you for that! I hope I find a field where I can somehow contribute to that.

2 Likes