Change volume using CC in .SFZ
Posted: Wed May 15, 2024 10:28 am
Been searching all day, and hacking away at an .sfz file, and still cannot find a decent solution.
You can skip the background and just scroll down to THE TECHNICAL ISSUE AT HAND.
Here's my problem (use case). I've been using SoundFonts (.sf2) in MuseScore, and I want to try using .sfz files instead. My goal is to have a "WYHIWYG" (What You Hear Is What You Get) setup, where I can hear the composition as it will sound in the final product, as I compose.
I currently have a workflow where I export each track (rendered by MuseScore's internal SoundFont rendering engine) to a separate .flac, import these into Ardour, then mix in Ardour. Works great. But its not "WYHIWYG". To hear the final product while composing, I need to generate live audio from the midi data coming from MuseScore, and mix that in Ardour, Carla, or some other mixer.
The problem is, MuseScore has a single audio output channel. I can parcel out the midi data to liquidsfz plugins, one per voice. I tried that. It renders perfectly, but to do symphonic stuff, I'd need about 60 tracks, with a separate instance of liquidsfz in each. Maybe its doable on a high-end machine, but not on my old laptop!
So what I'm envisioning, is scripting linuxsampler to so that I have maybe four or five channels, each handling up to 16 midi voices, and then route these groups to Ardour buses where I can apply effects.
THE TECHNICAL ISSUE AT HAND:
Getting notes to fade in/fade out. Having a string section build in volume, or a single flute fade into almost silence, then come back. So far, impossible with linuxsampler.
MuseScore by default uses CC02, repeatedly sending an integer value corresponding to a note's initial velocity, as the note fades in / out. The CC02 value is routed to the velocity parameter of the player engine (with a factor applied).
Experimenting with linuxsampler, it's becoming apparent that the initial velocity can never be "replaced" by a new value from an incoming CC message. That's the ideal.
Here's an excerpt from an .sfz from Sonatina Symphonic Orchestra (https://github.com/peastman/sso.git):
Well, according to https://www.linuxsampler.org/sfz/, "gain_cc" is not supported. 
What do?
I tried:
Not the effect I'm looking for. I can't get the normal initial volume to jibe with the volume I get after the CC02 messages are received.
Any suggestions?
You can skip the background and just scroll down to THE TECHNICAL ISSUE AT HAND.
Here's my problem (use case). I've been using SoundFonts (.sf2) in MuseScore, and I want to try using .sfz files instead. My goal is to have a "WYHIWYG" (What You Hear Is What You Get) setup, where I can hear the composition as it will sound in the final product, as I compose.
I currently have a workflow where I export each track (rendered by MuseScore's internal SoundFont rendering engine) to a separate .flac, import these into Ardour, then mix in Ardour. Works great. But its not "WYHIWYG". To hear the final product while composing, I need to generate live audio from the midi data coming from MuseScore, and mix that in Ardour, Carla, or some other mixer.
The problem is, MuseScore has a single audio output channel. I can parcel out the midi data to liquidsfz plugins, one per voice. I tried that. It renders perfectly, but to do symphonic stuff, I'd need about 60 tracks, with a separate instance of liquidsfz in each. Maybe its doable on a high-end machine, but not on my old laptop!

So what I'm envisioning, is scripting linuxsampler to so that I have maybe four or five channels, each handling up to 16 midi voices, and then route these groups to Ardour buses where I can apply effects.
THE TECHNICAL ISSUE AT HAND:
Getting notes to fade in/fade out. Having a string section build in volume, or a single flute fade into almost silence, then come back. So far, impossible with linuxsampler.
MuseScore by default uses CC02, repeatedly sending an integer value corresponding to a note's initial velocity, as the note fades in / out. The CC02 value is routed to the velocity parameter of the player engine (with a factor applied).
Experimenting with linuxsampler, it's becoming apparent that the initial velocity can never be "replaced" by a new value from an incoming CC message. That's the ideal.
Here's an excerpt from an .sfz from Sonatina Symphonic Orchestra (https://github.com/peastman/sso.git):
Code: Select all
<group>
amp_veltrack=0
volume=-30
gain_cc1=30

What do?
I tried:
Code: Select all
volume=-20
volume_oncc2=20
amp_veltrack=100
Any suggestions?