Add ability to have a different MIDI pitch for drum instrument based on articulation or tremolo
Currently, MuseScore renders articulations for all instruments in two ways: it changes the length of the notes (gate time for staccato) or it changes MIDI velocity (accent for example). These behaviors are currently configurable in instruments.xml at the instrument level.
Unfortunately, a popular way to notate an open hi-hat for drums for example is to use a "open" symbol on top of the note. In this case, MuseScore should use a different MIDI pitch based on this "articulation" instead of changing the velocity or the length of the note. It also common to use accents or stacattos to notate different sound.
In a similar manner, MuseScore renders tremolos by sending several MIDI events. For drums, a possibility to send a single event on a different pitch would be useful.
I would propose to add a new concept of "variants" for a given drum instrument.Currently a drum instrument is defined as a [MIDI pitch + notehead + line] triple. In the drum palette, the user chooses one of this element and that's it.
My proposal is to add one or more variant would be added to this triplet: a variant would have a pitch and an articulation and/or a tremolo. If the user chooses a drum instrument from the palette, it would work exactly the same. If it adds an articulation and/or a tremolo to the chord, MuseScore would then play the matching MIDI pitch defined in the variant.
Questions are :
- What do we do with articulations defined at the instrument level ? Do we stop rendering them for drums? or Do we render them for drum instrument without variants? Or do we render them only when there is no matching variants for a given tremolo/articulation? At least, for articulations we have control on the instrument in instruments.xml, so we can just keep on rendering them.
- Same question for tremolos. Unfortunately, tremolos are currently always rendered and this is not modifiable on an instrument basis in instruments.xml.
Comments
For master, see https://github.com/musescore/MuseScore/pull/3667
What do we do with articulations defined at the instrument level ? Do we stop rendering them for drums? or Do we render them for drum instrument without variants? Or do we render them only when there is no matching variants for a given tremolo/articulation? At least, for articulations we have control on the instrument in instruments.xml, so we can just keep on rendering them.
In the above PR, I chose to not deal with articulation. It will be the responsability of the user when creating instruments.xml to choose suitable values for articulations.
Same question for tremolos. Unfortunately, tremolos are currently always rendered and this is not modifiable on an instrument basis in instruments.xml.
For tremolo, they will be played in the legacy way if all the notes of a chord don't have a variant with a matching tremolo type. Put differently, If one of the notes has one matching variant with a matching tremolo type then the tremolo will not be played in the legacy way.
In reply to What do we do with… by [DELETED] 5
I'm curious if you could make the articulations respond to the articulation properties Channel and midi action. Does midi action mean a different midi channel? These appear if you right click the articulation and select "Articulation Properties..." but I have seen no documentation on this dialog box. I would suggest, in a similar way that you have already done, leave it to the user to define the action and put it in his own palette. I just discovered this box, so I haven't tried anything with it yet.
MIDI Actions are defined at the instrument level in instruments.xml. There was plan in the code to associate them with articulations but the implementation is not complete. That's why we see Channels and MIDI actions in articulation properties.
Currently MIDI action can only trigger CC message on staff text (and it's the most tested feature of MuseScore).
Fixed in branch master, commit b8138c1629
fix #272276: Add ability to have a different MIDI pitch for drum instrument based on articulation or tremolo
Fixed in branch master, commit d5a2be1344
Merge pull request #3667 from lasconic/drumset-variants
fix #272276: Add ability to have a different MIDI pitch for drum instrument based on articulation or tremolo
Reopened for 2.3
Quick doc, the above commit adds the ability to define variants in instruments.xml. There is no UI for it right now (and no plan to add one for 2.3).
Let's say you have an open hi-hat defined as follow in instruments.xml
You want to adhere to whatever standard that requires "Open hi-hat" to be notated the same but with a "open" articulation marking, but of course played on pitch 46 and not 42. You can now do it by defining it like this.
Valid name for articulations are:
staccatissimo, staccato, portato, tenuto, marcato, sforzato, open, closed, harmonic
You also have a sample for roll on hi hat ? And you want two strike tremolo to be played with this sample trigger on midi pitch 47 ? No problem. If you don't mention any variant for tremolo, they will be played the same than in 2.2 by repeating the note several times.
Valid name for tremolos are:
r8, r16, r32, r64
. Buzz still needs to be implemented. See #256021: Add buzz roll tremolo stemYou can also use one articulation and one tremolo tag for the same variant. It will trigger if the chord has both the tremolo and the articulation.
But currently no such changes/additions are in instruments.xml (for master), right? Shouldn't they?
I have no idea which mapping should be used. I will let @Daniel do it for the new drumline soundfont.
If possible, this kind of implementation could be used to specify left and right hand samples for marching percussion. Refer back to a post I made a while back: https://musescore.org/en/node/271937
Fixed in branch 2.3, commit 53ce87fb51
fix #272276: Add ability to have a different MIDI pitch for drum instrument based on articulation or tremolo
Fixed in branch 2.3, commit 368ee48394
Merge pull request #3674 from lasconic/drumset-variants-2.3
fix #272276: Add ability to have a different MIDI pitch for drum inst…
@LuckyLion, unfortunately, this implementation is only for notehead/line/articulation. We don't have articulations for sticking. We could use staff text and change CC, but staff text (just like articulations) would be a pain to add. I guess sticking would need its own implementation, similar to lyrics...
See PR https://github.com/musescore/MuseScore/pull/3678 for compatibility between 2.3 and 3.0
Valid articulations in 2.3 and 3.0 with their mappings.
With #256021: Add buzz roll tremolo stem fixed, MuseScore 2.3 and MuseScore 3. will get a new value for tremolo:
buzzroll
Automatically closed -- issue fixed for 2 weeks with no activity.
@lasconic Can we also add a turn/prall as a variant for crush?
In reply to In 2.3, valid articulations… by [DELETED] 5
sforzato (or accent) ?
Added sforzato and mordent.
@lasconic - is May 17 post the full list of variants for current MuseScore 3 Master?