Trigger system for playback

• Mar 11, 2016 - 01:39

As MuseScore continues to improve notation-wise, the desire for better playback can be better addressed. But how do we create a system that's intuitive and extensible, without dramatically increasing complexity?

My suggestion: Playback triggers. To elaborate, when the playback cursor passes a certain static element (usually a repeat symbol), it sets a trigger. Elements that have an impact on playback (like notes, dynamics, ornaments) can have a property modified when a certain trigger is passed, such as "Play" or "Velocity".

From a code perspective, elements would need some way of defining triggers to set, and defining automation based on which triggers are set. The playback code would need to respect those triggers and insert modified events accordingly when the score is generated. It would be convenient if triggers could be set outside of playback so that, for example, the user could listen to the score after a repeat without having to take it.

If this is done properly, we could reap quite a few benefits regarding playback. Complex repeat systems could be implemented by automating the jump properties. We can have different verses be sung when singing gets implemented. Triggers could be implemented as midi control signals so that custom midi event support comes automatically, and articulations can cause altered playback in a DAW.

Notation still comes first, but I think a change like this can give MuseScore very sophisticated playback for a reasonable effort.


Comments

There is something already implemented in this direction but not well exposed I believe.

If you right click a staff text, staff text properties, MIDI Actions you can have a glimpse of what could be done. You will get two lists. The first one lists the channels for the staff (often normal only but with a trumpet or a violin you can get more channels), the other ones lists "actions" for the selected channel. These actions can be any MIDI event, in particular sysex message. Unfortunately there is no easy way to define these actions currently but you can craft a custom instruments.xml with instrument like https://github.com/musescore/MuseScore/blob/master/share/instruments/in…

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