Single note dynamics is not working in non-GUI mode
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.