How to create soundfonts that work with the new crescendo playback of MS 3.1.

• Apr 19, 2019 - 16:17

I've tried beta release of MS 3.1 and I've noticed that crescendo playback works only with those soundfonts marked with "Expr."
What are the differences between creating a normal sf or a sf with "Expr"?
I'd like to create some brass soundfonts that work with crescendo playback because the existing sfs are not satisfying for me.

Thanks for your replies.


In reply to by Ziya Mete Demircan

I tried this, and it didn't work quite consistently. When it did actually work (with the most recent beta), the soundfont didn't seem to actually use different samples for lower volumes- it would just make it quieter and quieter, making quiet dynamics nearly impossible to hear.

On a second attempt, it didn't work at all- nothing changed.

It's particularly bad with, say, a piano concerto- the orchestra is fine, but the piano is just awful.

In reply to by Ziya Mete Demircan

I don't think this video solves the problem Ispil mentioned, here you are using a consistent-sounding instrument while the problematic cases are piano/timpani/... which have very different timbre along the way from ppp to fff. Since you changed to "non-expressive" the timbre sounds in ppp are exactly the same as in fff, so even though the instrument is playing in a very quiet dynamics it still produces harsh/shrill sound, which is really bad for the ear.

In reply to by Ziya Mete Demircan

I'd really like to know exactly what it is that they did to the musescore HQ soundfont that made it work well with whatever code they've added for single note dynamics. With the soundfont I use (a version of GeneralUserGS with instruments added by me) it seems like it sets the velocities to something loud and it makes quiet passages sound really off sometimes. I'd just like to see all these excellent soundfonts that are out there be able to take advantage of this new feature

In reply to by Ajlewis3008

It is absolutely unhealthy to make all other fonts useless (by default) , inventing a nonsensical and nonfitting procedure, instead of using a simple and standard CC#11.

CC#7 and CC#11 combination is a standard system existing since 1996 and works even with the most primitive soundfonts.

cites from: Complete MIDI v0.1, Detailed Specification (1996); The MIDI Manufacturers Association, Los Angeles, CA

"Findings: Note surprisingly, all hardware respondents said that their devices were continuous. There were two cases in their hands. The recommended volume of CC#7 (volume) and CC#11 (expression) was used by MIDI. Roland uses the same response curve, and other Japanese manufacturers.

Of the 20 software respondents, all used CC#7 and 11 use CC#11. The largest number of software respondents (6) said they used CC#7 for dynamic expression during music playback. In 2 other cases, CC # 11 was set to a preset level and kept there."
...cite end here.

It is not a good idea to use CC#02 breathing control from the beginning. Because procedure is different (used like: velocity > aftertouch).

"Devices such as wind controllers can send Aftertouch from increasing breath pressure after the initial attack. The type of tone modification created by the Aftertouch is determined by the receiver. Aftertouch may be assigned to affect volume, timbre, vibrato, etc."
...cite (opere citato)

Strange inventions (such as: "Constant velocity; Use CC#02 (or CC#11) for dynamics") just create problems.
See what the MIDI spec says:

cite ...
Volume, Expression & Master Volume Response
Volume (CC # 7) and Expression (CC # 11) should be implemented as follows:
CC#7 is used (CC#11 is assumed #127 which):
 L (dB) = 40 log (V / 127) // where V = CC # 7 value

For situations in which controllers are used:
L (dB) = 40 log (V / 127 ^ 2) // where V = (volume x expression)
... cite (op. cit.)

A clearer formulation:
L (dB) = 40 log ((V * E) / (127 ^ 2)) // where V = volume and E = expression
If you eliminate the "40log" portion of this formula, the code for velocity and expression remains in your hand. ((V*E) / (127 ^ 2))

And the response of the software and keyboards/sound-modules should also be adjusted and measured.


CC#7 CC#11 amplitude 
127   127   0.0dB    
 96   127  -4.8dB    
 64   127 -11.9dB    
 32   127 -23.9dB    
 16   127 -36.0dB    
  0   127  -inf.     
CC#7 CC#11  amplitude
  127   96   - 4.8dB
  127   64   -11.9dB
  127   32   -23.9dB
  127    0   -inf.
   64   64   -23.9dB
   32   96   -28.8dB

...cite (op. cit.)

1996-2019 🤦‍♂️🤷‍♂️

It's a long message, and I know most of you aren't interested in that.
I keep writing it in vain; I'm sorry.

In reply to by Ziya Mete Demircan

We had to use a controller number that didn't already have a default behavior in MuseScore's synths to ensure that instruments not supporting the expressive method would "fall back" to velocity-only control.

MuseScore's "single note dynamics" (SND) sends both velocity and CC2 events simultaneously for maximum control of instrument expression. In supported instruments, CC2 controls note volume and tone while velocity controls note attack characteristics. If we had used CC11, user-added SoundFont instruments would end up with double the sound attenuation at low dynamics due to both velocity and CC11 compounding attenuation. By mapping to CC2 instead, normal SoundFont instruments will simply ignore the CC2 commands and fall back to velocity-only input.

It was my intention that this would be configurable for each SoundFont/SFZ/external MIDI source, but that is not how it got implemented, which unfortunately can make it frustrating to use SND with varied sound sources.

It is not the best idea to switch to CC11, if I'm not mistaken, it has worse quality. And since it's a global setup, all the Sound Fonts (SF2, SF3) and SFZ files will be switched to CC11 in your music. The best thing is to add support to Single Note Dynamics (SND) into your Sound Fonts and SFZ files.

I still didn't manage to add this support to SoundFonts, the only person I know that can for sure help us on that is S. Christian Collins.

For SFZ files, it's a simple process. Just add the following lines to each sample in the SFZ file you want to get the SND. I.e. for each sustain sample:

  • The volume line reduces the volume of the sample. According SfzEd (an SFZ editor), it can range between -48 and +6. But I've noticed Zerberus support beyond these limits. Well, you shold choose the value corresponding to a velocity of 1 (from 127). -40 dB is a good level.
  • Setting "amp veltrack" means that this sample's volume won't be affected by the velocity anymore. You do want that the CC changes the volume, not both.
  • gain CC2 you should set to be the volume of the fff level. In this case, it will be -40+40 = 0 dB. The -40 comes from the volume line. The highest supported value is, according to SfzEd, 44 dB.
    And if there are lines called hivel and lovel, set hivel to 127 and lovel to 0 so that they are triggered independently of the velocity.

In general, I use a velocity cross setup. That is, I use a p or mp sustain sample (more muffle) with volume = -15 and gain_cc2 = 15 and an ff or fff sample (brighter) with volume = -40 and gain_cc2 = 40. So, not only the volume changes, but it gets a bit brighter, which is way more realistic. And I keep some attack samples alongside, which have the standard velocity setup without gain cc2.

Here is the simple way to make your own SoundFonts work with MuseScore's default expressive mode:

  1. Edit your SoundFont in version 2.1.1 or later of Polyphone.
  2. Within each instrument (not preset), add the following modulators:

The first modulator disables the default velocity-to-attenuation curve (notice the text saying "disabling default mod."). The second modulator recreates that curve with MIDI controller #2 as the source.

I used a more complicated variation of this technique in MuseScore General that uses a different attenuation scale and allows CC2 to affect the filter as well. In the strings, I even use CC2 to crossfade between the forte and piano samples for a more natural change in tone across the dynamic range.

In reply to by s.chriscollins

Hello, i have a question, say i have "instruments" for soft, med, and loud dynamics for a trombone for example.

What can i do on Polyphone so it crossfades between each instrument in the preset at specific velocity marks (for exemple, soft plays between 0-64, then crossfades to med, then crossfades to loud at 96) when using SND ?

In reply to by Ziya Mete Demircan

Yes it's what i did already and it works for separate notes, but i'd like to be able to do dynamics on a single note, like crescendos and stuff.

S. Christian Collins said he was able to do this with string samples, i tried to reverse engeneer this from the musescore HD soundfont, but it does not works well with single instruments as it creates a chorus effect among other problems...

In reply to by Reloup

Yes, there are, of course, those who are trying to crossfade on the sf2 (maybe even those who succeeded).
But it takes a lot of effort to spread something that is not in the specification, and you have no guarantee that you can be 100 percent successful.
The Chorus effect consists of the poor tuning of the samples that overlap. Make sure that the tunings of the two overlapping samples match exactly.

Do you still have an unanswered question? Please log in first to post your question.