MuseScore's audio output does not produce accurate envelopes for custom soundfonts

• Apr 22, 2020 - 12:23
Reported version
S3 - Major

Over the course of a few months of usage, I've noticed that the ADSR envelope is generally inaccurate for custom soundfonts, especially synthesized ones. This mainly seems to be because the release of the envelope is ignored entirely, but I haven't investigated very far beyond recognizing that it isn't accurate and using different software to export audio.

Steps to reproduce:
1. Install a custom soundfont by opening a .sf2 file and making it the only active soundfont in the synthesizer panel. (At least one of the instruments should have at least one variable set to a value which affects its playback in MuseScore; such variables include – but may not be limited to – the envelope release variable.)
2. In the synthesizer panel, disable all active global effects (I think this is only Zita1 in the Master Effects tab by default).
3. Import a MIDI file (which does not have instrument changes or coarse program controls) without using quantization, duration simplification, staccato detection, tuplet detection, anacrusis detection or swing detection and play/export it using the soundfont.
4. Compare the audio to the audio produced by a different application which supports MIDI and SF2, such as LMMS (open source) or SynthFont (freeware).

I have attached a soundfont which has this issue. It was exported one instrument at a time from a DLS file using the free version of Awave Studio; the DLS file was generated by N64 Soundbank Tool.

Attachment Size 492.71 KB


It seemed implausible to me that there wasn't already an open bug report for this, but this thread seems to be the only place where the problem (which the author refers to as "truncation" of the envelope) has previously been documented. I tried investigating this a few months ago and this appeared to be the only relevant search result.