Single note dynamics is not working in non-GUI mode

• May 30, 2019 - 12:16
Reported version
3.1
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S2 - Critical
Reproducibility
Always
Status
active
Regression
No
Workaround
No
Project

1) Convert the attached score to .mp3 or .ogg:

mscore single_note_dynamics.mscz -o single_note_dynamics_conv.mp3

2) Play the audio file.
Result: single-note dynamics is not working.

If you do the same from MuseScore via a File→Export menu, all works fine. If you launch MuseScore with -s option and export a score via a File→Export menu, then single-note dynamics breaks.

The reason is that both with -s option and in non-GUI mode the global synthesizer object (synti) is not created and, thus, updateExpressive() call on score reading fails to switch MIDI patch numbers for the score's channels to expressive patches. I have a patch that fixes the symptoms of this issue (see this commit) but it looks like some sort of hack since it updates the channels' "expressiveness" following the used synthesizer settings and then switches it back to restore the previous settings. It turns out that proper MIDI rendering now depends on some synthesizer object being created and properly used (this discussion is somewhat related to this issue). Maybe the fix could be constructed in a way that addresses this more general issue too.

Attachment Size
single_note_dynamics.mscz 6.15 KB

Comments

There is a fix for this in the 3.1_com_backend branch, 88d16b5 (mentioned about, but not explict enouhg for me to have spotted it)
Maybe it should get cherry-picked into master