MuseScore 23/07/2015: MIDI Actions #3

Now I understand how the current implementation of MIDI Actions work.

Every Instrument has a list of MIDI Actions, every MIDI Action is a list of MIDI events (defined in instruments.xml). Also every Instrument has a set of Channels (for example, normal/pizzicato/tremolo), every Channel also has a list of MIDI Actions.
Thus, we have two sets of MIDI Actions: the first one related to every Channel of Instrument, and the second one is channel-dependent.
To add MIDI Action to a certain position of the Score we use StaffText and SystemText elements, they just store names of selected MIDI Actions.

As I mentioned before, MIDI Action is a list of MIDI events, so it is possible to have duplicates of MIDI events in different places.

I wanted to implement it this way: store a list of used MIDI events in a Score. This list is accessible for every Instrument and Instrument's Channel. StaffText/SystemText will just store pointers/links/names of MIDI events. Notice that I'm going to store MIDI events in the Score, not sets of events (Actions). Since users will be able to add arbitrary MIDI events, there is no need to create sets of predefined events for them: they could construct any sequence of MIDI events by themselves.

The disadvantage derives from storing MIDI events in Score. Since Score will contain predefined and user-defined MIDI events, how can we share user-defined events across several scores?
Before this could be easily done by editing instruments.xml file - changes were affecting all new instruments in all scores.