From 4d172e84f222bfac4daca18b2ff5be159d16feb5 Mon Sep 17 00:00:00 2001 From: Peter Jonas Date: Mon, 27 Jan 2025 19:36:51 +0000 Subject: [PATCH] Use General MIDI Percussion as the standard drumset The standard drumset is used for unknown percussion instruments found when opening a pre-3.6 score or importing a non-native format like MIDI, MusicXML, Guitar Pro, etc. Also run the Python script to fetch the latest instrument data, which now includes custom noteheads for some percussion instruments. --- share/instruments/instruments.xml | 1581 +++++++++++------ share/instruments/instrumentsxml.h | 72 +- share/instruments/update_instruments_xml.py | 35 +- src/engraving/dom/drumset.cpp | 562 +++++- src/engraving/dom/instrtemplate.cpp | 10 +- src/engraving/dom/instrument.cpp | 31 +- .../tests/data/all-percussion.gp-ref.mscx | 4 +- .../tests/data/all-percussion.gp5-ref.mscx | 4 +- .../tests/data/all-percussion.gpx-ref.mscx | 16 +- .../tests/data/percussion-beams.gp-ref.mscx | 4 +- .../tests/data/testFinaleInstr_ref.mscx | 1212 ++++++++++--- .../tests/data/testImportDrums2_ref.mscx | 60 +- .../tests/data/testImportDrums_ref.mscx | 60 +- .../tests/data/testInstrImport_ref.mscx | 326 +++- .../tests/data/testStickingLyrics_ref.mscx | 60 +- .../tests/data/testVirtualInstruments_ref.xml | 4 +- 16 files changed, 2944 insertions(+), 1097 deletions(-) diff --git a/share/instruments/instruments.xml b/share/instruments/instruments.xml index 5f713e9c14ebb..eb4194f3fbe06 100644 --- a/share/instruments/instruments.xml +++ b/share/instruments/instruments.xml @@ -7227,7 +7227,13 @@ 1 0 - cross + normal + + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + -1 0 Mute High Conga @@ -7308,89 +7314,90 @@ drums - - Large Drum Kit - Drum Kit - D. Kit - Drum Kit. - drum.group.set - PERC - percussion - 1 - 1 - 0 - - - - - - common - popular - jazz - orchestra - concertband - marching - - - drums - - 4-Piece Drum Kit + Drum Kit (large) Drum Kit D. Kit - 4 piece drum kit. + Large drum kit. drum.group.set PERC percussion 1 1 0 + + normal + 8 + 1 + Bass Drum 2 + 2 + 1 + 0 + normal 7 1 - Bass Drum + Bass Drum 1 2 B - 2 + 0 0 + + slashed1 + 3 + 0 + Side Stick + 1 + 1 + 1 + normal 3 0 - Snare + Acoustic Snare 1 A - 1 - 0 + 0 + 1 - - slashed1 + + slash 3 0 - Cross-stick + Electric Snare 1 - 1 - 1 + 2 + 0 - + normal - 1 + 6 0 - Tom + Low Floor Tom 1 - E 1 + 7 + + + cross + -1 + 0 + Closed Hi-Hat + 1 + G + 0 2 - + normal 5 0 - Floor Tom + High Floor Tom 1 - 1 - 3 + 0 + 7 cross @@ -7399,37 +7406,83 @@ Pedal Hi-Hat 2 F - 2 - 1 + 1 + 2 - - cross - -1 + + normal + 4 0 - Closed Hi-Hat + Low Tom 1 - G - 0 - 0 + 1 + 6 - cross + xcircle -1 0 Open Hi-Hat 1 0 - 1 + 3 + + + normal + 2 + 0 + Low-Mid Tom + 1 + 1 + 5 + + + normal + 1 + 0 + Hi-Mid Tom + 1 + 0 + 6 + + + cross + -2 + 0 + Crash Cymbal 1 + 1 + C + 0 + 4 + + + normal + 0 + 0 + High Tom + 1 + E + 1 + 4 cross 0 0 - Ride Cymbal + Ride Cymbal 1 1 D 0 - 2 + 5 + + + cross + -4 + 0 + China Cymbal + 1 + 2 + 3 diamond @@ -7437,19 +7490,54 @@ 0 Ride Bell 1 - 0 - 3 + 2 + 5 - + + diamond + 1 + 0 + Tambourine + 1 + 2 + 1 + + cross - -2 + -5 0 - Crash Cymbal + Splash Cymbal 1 - C - 0 + 2 4 + + triangle-down + 1 + 0 + Cowbell + 1 + 2 + 2 + + + cross + -3 + 0 + Crash Cymbal 2 + 1 + 1 + 3 + + + cross + 2 + 0 + Ride Cymbal 2 + 1 + 2 + 6 + @@ -7457,18 +7545,17 @@ common popular - jazz orchestra concertband marching - + drums - - 5-Piece Drum Kit + + Drum Kit (minimal) Drum Kit D. Kit - 5 piece drum kit. + Minimal drum kit, 4-piece. drum.group.set PERC percussion @@ -7482,17 +7569,7 @@ Bass Drum 2 B - 2 - 0 - - - normal - 3 - 0 - Snare - 1 - A - 1 + 0 0 @@ -7504,24 +7581,15 @@ 1 1 - - normal - 1 - 0 - High Tom - 1 - E - 1 - 2 - - + normal - 2 + 3 0 - Low Tom + Snare 1 - 1 - 3 + A + 0 + 1 normal @@ -7529,18 +7597,8 @@ 0 Floor Tom 1 - 1 - 4 - - - cross - 9 - 1 - Pedal Hi-Hat - 2 - F - 2 - 1 + 0 + 7 cross @@ -7550,16 +7608,46 @@ 1 G 0 - 0 + 2 - + cross + 9 + 1 + Pedal Hi-Hat + 2 + F + 1 + 0 + + + xcircle -1 0 Open Hi-Hat 1 0 - 1 + 3 + + + cross + -2 + 0 + Crash Cymbal + 1 + C + 0 + 4 + + + normal + 1 + 0 + Tom + 1 + E + 0 + 6 cross @@ -7569,7 +7657,7 @@ 1 D 0 - 2 + 5 diamond @@ -7577,9 +7665,118 @@ 0 Ride Bell 1 + 1 + 2 + + + + + + + common + popular + orchestra + concertband + marching + + + drums + + Drum Kit (common) + Drum Kit + D. Kit + Common drum kit, 5-piece. + drum.group.set + PERC + percussion + 1 + 1 + 0 + + normal + 8 + 1 + Bass Drum 2 + 2 + 1 + 0 + + + normal + 7 + 1 + Bass Drum + 2 + B + 0 + 0 + + + slashed1 + 3 + 0 + Cross-stick + 1 + 1 + 1 + + + normal + 3 + 0 + Snare + 1 + A + 0 + 1 + + + normal + 5 + 0 + Floor Tom + 1 + 0 + 7 + + + cross + -1 + 0 + Closed Hi-Hat + 1 + G + 0 + 2 + + + cross + 9 + 1 + Pedal Hi-Hat + 2 + F + 1 + 3 + + + xcircle + -1 + 0 + Open Hi-Hat + 1 0 3 + + normal + 2 + 0 + Low Tom + 1 + 1 + 6 + cross -2 @@ -7590,32 +7787,67 @@ 0 4 - + + normal + 1 + 0 + High Tom + 1 + E + 0 + 6 + + cross - -3 + 0 0 - Crash Cymbal 2 + Ride Cymbal 1 + D 0 5 - cross - -4 + normal + + noteheadHeavyXHat + noteheadHeavyXHat + noteheadHeavyXHat + noteheadHeavyXHat + + -3 0 China Cymbal 1 - 0 - 6 + 1 + 7 + + + diamond + 0 + 0 + Ride Bell + 1 + 1 + 5 cross - -5 + -4 0 Splash Cymbal 1 - 0 - 7 + 1 + 2 + + + cross + -3 + 0 + Crash Cymbal 2 + 1 + 1 + 4 @@ -7624,7 +7856,6 @@ common popular - jazz orchestra concertband marching @@ -7854,7 +8085,17 @@ 1 1 0 - + + cross + 0 + 0 + Taiko Mute + 1 + B + 0 + 1 + + normal 0 0 @@ -8029,7 +8270,7 @@ normal 0 0 - Chinese Cymbal + China Cymbal 1 A 0 @@ -8183,7 +8424,7 @@ cross 0 0 - Closed Hi-hat + Closed Hi-Hat 1 B 0 @@ -8640,6 +8881,16 @@ 1 A 0 + 1 + + + normal + 0 + 0 + Long Güiro + 1 + A + 0 0 @@ -8851,246 +9102,27 @@ world classroom - + other-percussion - Percussion - Percussion - Perc. - Orchestral percussion drumset. - drum.group.set + Quijada + Quijada + Qui. + Dried donkey or horse jawbone, traditionally used as a rattle in some Latin American countries. + rattle.jawbone PERC - percussion + percussion 1 1 0 - - cross - -1 + + normal + 0 0 - Closed Hi-Hat + Quijada 1 - G - 0 - 2 - - - cross - 9 - 1 - Pedal Hi-Hat - 2 - F + A 0 - 3 - - - cross - 1 - 0 - Open Hi-Hat - 1 - E - 0 - 4 - - - cross - 0 - 0 - Ride Cymbal 1 - 1 - 0 - 1 - - - normal - 7 - 1 - Bass Drum 1 - 2 - B - 2 - 0 - - - cross - 3 - 0 - Side Stick - 1 - 1 - 1 - - - normal - 3 - 0 - Acoustic Snare - 1 - A - 1 - 0 - - - diamond - 2 - 0 - Tambourine - 1 - 1 - 2 - - - cross - -3 - 0 - Splash Cymbal - 1 - 0 - 5 - - - triangle-down - 1 - 0 - Cowbell - 1 - 1 - 3 - - - diamond - 1 - 0 - Vibraslap - 1 - 1 - 6 - - - cross - -2 - 0 - Hand Cymbals - 1 - C - 0 - 0 - - - cross - 2 - 0 - Mute High Conga - 1 - 2 - 3 - - - cross - 4 - 0 - Open High Conga - 1 - 2 - 2 - - - cross - 6 - 0 - Low Conga - 1 - 2 - 1 - - - normal - 2 - 0 - Maracas - 1 - 2 - 5 - - - normal - 0 - 0 - Claves - 1 - 1 - 4 - - - diamond - 0 - 0 - Open Triangle - 1 - D - 0 - 6 - - - normal - 4 - 0 - Shaker - 1 - 2 - 4 - - - cross - 2 - 0 - Mark Tree - 1 - 0 - 7 - - - normal - 1 - 0 - Castanets - 1 - 1 - 5 - - - - - - - popular - choral - orchestra - concertband - marching - - - other-percussion - Quijada - Quijada - Qui. - Dried donkey or horse jawbone, traditionally used as a rattle in some Latin American countries. - rattle.jawbone - PERC - percussion - 1 - 1 - 0 - - normal - 0 - 0 - Quijada - 1 - A - 0 - 0 + 0 @@ -9170,216 +9202,655 @@ normal 0 0 - Shaker + Shaker + 1 + A + 0 + 0 + + + + + + + + + other-percussion + Shell Wind Chimes + Shell Wind Chimes + Sh. Wn Ch. + Shell wind chimes. + metal.bells.wind-chimes + PERC + percussion + 1 + 1 + 0 + + normal + 0 + 0 + Shell Wind Chimes + 1 + A + 0 + 0 + + + + + + + + + other-percussion + Stones + Stones + Sto. + Stones. + rattle.lava-stones + PERC + percussion + 1 + 1 + 0 + + normal + 0 + 0 + Stones + 1 + A + 0 + 0 + + + + + + + + + other-percussion + Tambourine + Tambourine + Tamb. + Tambourine. + drum.tambourine + PERC + percussion + 1 + 1 + 0 + + normal + 0 + 0 + Tambourine + 1 + A + 0 + 0 + + + + + + + common + popular + orchestra + concertband + marching + classroom + + + other-percussion + Tubo + Tubo + Tu. + Large shaker in the form of a tube. + PERC + percussion + 1 + 1 + 0 + + cross + -1 + 0 + Mute High Conga + 1 + B + 0 + 2 + + + normal + 0 + 0 + High Conga + 1 + C + 0 + 1 + + + normal + 1 + 0 + Low Conga + 1 + D + 0 + 0 + + + + + + + world + + + other-percussion + Vibraslap + Vibraslap + Vibslp. + Vibraslap. + rattle.vibraslap + PERC + percussion + 1 + 1 + 0 + + normal + 0 + 0 + Vibraslap + 1 + A + 0 + 0 + + + + + + + concertband + classroom + + + other-percussion + Whip + Whip + Wh. + Two wooden boards joined by a hinge, played by being brought together rapidly. Also known as a slap stick. + effect.whip + PERC + percussion + 1 + 1 + 0 + + normal + 0 + 0 + Whip + 1 + A + 0 + 0 + + + + + + + orchestra + concertband + classroom + + + other-percussion + + General MIDI Percussion + Percussion + Perc. + General MIDI percussion kit with Level 2 extensions. + drum.group + PERC + percussion + 1 + 1 + + + + + + common + popular + jazz + orchestra + concertband + marching + electronic + + + other-percussion + Mixed Percussion + Percussion + Perc. + Orchestral percussion kit. + drum.group.set + PERC + percussion + 1 + 1 + 0 + + cross + -1 + 0 + Closed Hi-Hat + 1 + 4 + 5 + + + cross + 9 + 1 + Pedal Hi-Hat + 2 + 4 + 7 + + + xcircle + -1 + 0 + Open Hi-Hat + 1 + 4 + 6 + + + cross + 0 + 0 + Ride Cymbal + 1 + 5 + 0 + + + plus + -1 + 0 + Stick Click + 1 + 4 + 4 + + + normal + 7 + 1 + Bass Drum + 2 + 0 + 0 + + + slashed1 + 3 + 0 + Side Stick + 1 + 1 + 1 + + + normal + 3 + 0 + Snare + 1 + 0 + 1 + + + diamond + 6 + 0 + Tambourine + 1 + 0 + 6 + + + cross + -4 + 0 + Splash Cymbal + 1 + 5 + 1 + + + triangle-down + 0 + 0 + Cowbell + 1 + 2 + 7 + + + cross + -2 + 0 + Suspended Cymbal + 1 + 0 + 4 + + + ti + 0 + 0 + Vibraslap + 1 + 1 + 3 + + + cross + 4 + 0 + Hand Cymbals + 1 + 0 + 5 + + + normal + -1 + 0 + Hi Bongo + 1 + 2 + 6 + + + normal + 0 + 0 + Lo Bongo + 1 + 2 + 5 + + + normal + + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + + 1 + 0 + Mute Hi Conga + 1 + 2 + 4 + + + normal + 1 + 0 + Hi Conga + 1 + 2 + 3 + + + normal + 2 + 0 + Lo Conga + 1 + 2 + 2 + + + normal + 5 + 0 + Hi Timbale + 1 + 2 + 1 + + + normal + 7 + 0 + Lo Timbale + 1 + 2 + 0 + + + triangle-down + -2 + 0 + Hi Agogô + 1 + 3 + 7 + + + triangle-down + -1 + 0 + Lo Agogô + 1 + 3 + 6 + + + diamond + 2 + 0 + Cabasa + 1 + 1 + 6 + + + diamond + 4 + 0 + Maracas + 1 + 1 + 5 + + + ti + -3 + 0 + Long Whistle + 1 + 4 + 2 + + + cross + -3 + 0 + Short Whistle + 1 + 4 + 3 + + + cross + -1 + 0 + Short Güiro + 1 + 3 + 5 + + + slashed1 + -1 + 0 + Long Güiro + 1 + 3 + 4 + + + la + 0 + 0 + Claves + 1 + 0 + 7 + + + la + 5 + 0 + Hi Woodblock + 1 + 3 + 3 + + + la + 7 + 0 + Lo Woodblock + 1 + 3 + 2 + + + cross + 8 + 0 + Mute Cuica 1 - A - 0 - 0 + 4 + 1 - - - - - - - - other-percussion - Shell Wind Chimes - Shell Wind Chimes - Sh. Wn Ch. - Shell wind chimes. - metal.bells.wind-chimes - PERC - percussion - 1 - 1 - 0 - - normal - 0 + + slashed2 + 8 0 - Shell Wind Chimes + Open Cuica 1 - A - 0 + 4 0 - - - - - - - - other-percussion - Stones - Stones - Sto. - Stones. - rattle.lava-stones - PERC - percussion - 1 - 1 - 0 - - normal + + cross 0 0 - Stones + Mute Triangle 1 - A 0 - 0 + 3 - - - - - - - - other-percussion - Tambourine - Tambourine - Tamb. - Tambourine. - drum.tambourine - PERC - percussion - 1 - 1 - 0 - - normal + + triangle-up 0 0 - Tambourine - 2 - A + Triangle + 1 0 - 0 + 2 - - - - - - common - popular - orchestra - concertband - marching - classroom - - - other-percussion - Tubo - Tubo - Tu. - Large shaker in the form of a tube. - PERC - percussion - 1 - 1 - 0 - - cross - -1 + + diamond + 5 0 - Mute High Conga + Shaker 1 - B - 0 - 2 + 1 + 4 - - normal - 0 + + triangle-down + 3 0 - High Conga + Sleigh Bells 1 - C - 0 - 1 + 1 + 2 - - normal - 1 + + ti + 2 0 - Low Conga + Mark Tree 1 - D - 0 + 1 0 - - - - - - world - - - other-percussion - Vibraslap - Vibraslap - Vibslp. - Vibraslap. - rattle.vibraslap - PERC - percussion - 1 - 1 - 0 - - normal - 0 + + la + 2 0 - Vibraslap + Castanets 1 - A - 0 - 0 + 1 + 7 - - - - - - concertband - classroom - - - other-percussion - Whip - Whip - Wh. - Two wooden boards joined by a hinge, played by being brought together rapidly. Also known as a slap stick. - effect.whip - PERC - percussion - 1 - 1 - 0 - + normal - 0 + + noteheadSlashX + noteheadSlashX + noteheadSlashX + noteheadSlashX + + 4 0 - Whip + Mute Surdo 1 - A - 0 + 3 + 1 + + + slash + 4 + 0 + Surdo + 1 + 3 0 - + - + + common + popular + jazz orchestra concertband - classroom + marching @@ -9414,7 +9885,13 @@ 0 - xcircle + normal + + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + 1 0 Rim Shot @@ -9462,7 +9939,7 @@ ti 1 0 - Visual (BS,X-Over,Etc) + Backstick 0 5 @@ -9475,7 +9952,7 @@ 2 - cross + xcircle -1 0 Open Hi-Hat @@ -9974,7 +10451,7 @@ 6 - do + diamond 0 0 Bell Tap @@ -9982,7 +10459,7 @@ 0 - do + diamond 0 0 Bell Tap-Choke @@ -9990,7 +10467,7 @@ 1 - do + plus 0 0 Muted Tap @@ -9998,7 +10475,13 @@ 7 - cross + normal + + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + 0 0 Smash @@ -10968,26 +11451,6 @@ marching electronic - - synths - Percussion Synthesizer - Percussion Synthesizer - Perc. Syn. - Percussion synthesizer. - drum.snare-drum.electric - PERC - percussion - 1 - 1 - - - - - - popular - marching - electronic - synths Atmosphere Synthesizer diff --git a/share/instruments/instrumentsxml.h b/share/instruments/instrumentsxml.h index 0739aaabbd04d..c03637a40b83c 100644 --- a/share/instruments/instrumentsxml.h +++ b/share/instruments/instrumentsxml.h @@ -3871,31 +3871,31 @@ QT_TRANSLATE_NOOP3("engraving/instruments", "Cuica", "cuica longName"), //: shortName for Cuica; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Cu.", "cuica shortName"), -//: description for Large Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit.", "drumset description"), -//: trackName for Large Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Large Drum Kit", "drumset trackName"), -//: longName for Large Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +//: description for Drum Kit (large); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Large drum kit.", "drumset description"), +//: trackName for Drum Kit (large); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit (large)", "drumset trackName"), +//: longName for Drum Kit (large); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit", "drumset longName"), -//: shortName for Large Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +//: shortName for Drum Kit (large); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "D. Kit", "drumset shortName"), -//: description for 4-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "4 piece drum kit.", "drum-kit-4 description"), -//: trackName for 4-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "4-Piece Drum Kit", "drum-kit-4 trackName"), -//: longName for 4-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +//: description for Drum Kit (minimal); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Minimal drum kit, 4-piece.", "drum-kit-4 description"), +//: trackName for Drum Kit (minimal); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit (minimal)", "drum-kit-4 trackName"), +//: longName for Drum Kit (minimal); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit", "drum-kit-4 longName"), -//: shortName for 4-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +//: shortName for Drum Kit (minimal); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "D. Kit", "drum-kit-4 shortName"), -//: description for 5-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "5 piece drum kit.", "drum-kit-5 description"), -//: trackName for 5-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "5-Piece Drum Kit", "drum-kit-5 trackName"), -//: longName for 5-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +//: description for Drum Kit (common); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Common drum kit, 5-piece.", "drum-kit-5 description"), +//: trackName for Drum Kit (common); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit (common)", "drum-kit-5 trackName"), +//: longName for Drum Kit (common); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Drum Kit", "drum-kit-5 longName"), -//: shortName for 5-Piece Drum Kit; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +//: shortName for Drum Kit (common); Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "D. Kit", "drum-kit-5 shortName"), //: description for Field Drum; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names @@ -4240,15 +4240,6 @@ QT_TRANSLATE_NOOP3("engraving/instruments", "Maracas", "maracas longName"), //: shortName for Maracas; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Mrcs.", "maracas shortName"), -//: description for Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Orchestral percussion drumset.", "percussion description"), -//: trackName for Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion", "percussion trackName"), -//: longName for Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion", "percussion longName"), -//: shortName for Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Perc.", "percussion shortName"), - //: description for Quijada; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Dried donkey or horse jawbone, traditionally used as a rattle in some Latin American countries.", "quijada description"), //: trackName for Quijada; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names @@ -4339,6 +4330,24 @@ QT_TRANSLATE_NOOP3("engraving/instruments", "Whip", "whip longName"), //: shortName for Whip; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Wh.", "whip shortName"), +//: description for General MIDI Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "General MIDI percussion kit with Level 2 extensions.", "percussion-synthesizer description"), +//: trackName for General MIDI Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "General MIDI Percussion", "percussion-synthesizer trackName"), +//: longName for General MIDI Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion", "percussion-synthesizer longName"), +//: shortName for General MIDI Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Perc.", "percussion-synthesizer shortName"), + +//: description for Mixed Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Orchestral percussion kit.", "percussion description"), +//: trackName for Mixed Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Mixed Percussion", "percussion trackName"), +//: longName for Mixed Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion", "percussion longName"), +//: shortName for Mixed Percussion; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names +QT_TRANSLATE_NOOP3("engraving/instruments", "Perc.", "percussion shortName"), + // Percussion - Marching QT_TRANSLATE_NOOP("engraving/instruments/group", "Percussion - Marching"), @@ -4776,15 +4785,6 @@ QT_TRANSLATE_NOOP3("engraving/instruments", "Ondes Martenot", "ondes-martenot lo //: shortName for Ondes Martenot; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "O.M.", "ondes-martenot shortName"), -//: description for Percussion Synthesizer; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion synthesizer.", "percussion-synthesizer description"), -//: trackName for Percussion Synthesizer; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion Synthesizer", "percussion-synthesizer trackName"), -//: longName for Percussion Synthesizer; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Percussion Synthesizer", "percussion-synthesizer longName"), -//: shortName for Percussion Synthesizer; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names -QT_TRANSLATE_NOOP3("engraving/instruments", "Perc. Syn.", "percussion-synthesizer shortName"), - //: description for Atmosphere Synthesizer; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names QT_TRANSLATE_NOOP3("engraving/instruments", "Atmosphere synth effect (General MIDI program 100).", "atmosphere-synth description"), //: trackName for Atmosphere Synthesizer; Please see https://github.com/musescore/MuseScore/wiki/Translating-instrument-names diff --git a/share/instruments/update_instruments_xml.py b/share/instruments/update_instruments_xml.py index e51dc91f33c43..7f6ce2a48dcf8 100755 --- a/share/instruments/update_instruments_xml.py +++ b/share/instruments/update_instruments_xml.py @@ -55,7 +55,7 @@ def eprint(*args, **kwargs): 'GM+GS_Percussion': '1216482735', } -standard_drumset_id = 'drumset' +standard_drumset_id = 'percussion-synthesizer' # General MIDI Percussion (most generic kit) parser = argparse.ArgumentParser(description='Fetch the latest spreadsheet and generate instruments.xml.') parser.add_argument('-c', '--cached', action='store_true', help='Use cached version instead of downloading') @@ -304,6 +304,15 @@ def to_list(str): if pitch in gmgs_percussion: to_comment(d_el, gmgs_percussion[pitch], 'name') to_subelement(d_el, drum, 'head') + + noteheads_el = ET.Element('noteheads') + to_subelement(noteheads_el, drum, 'quarter') + to_subelement(noteheads_el, drum, 'half') + to_subelement(noteheads_el, drum, 'whole') + to_subelement(noteheads_el, drum, 'breve') + if noteheads_el.find('*') is not None: + d_el.append(noteheads_el) + to_subelement(d_el, drum, 'line') to_subelement(d_el, drum, 'voice') to_subelement(d_el, drum, 'drum', 'name') @@ -516,6 +525,11 @@ def noteheadgroup(tag): return 'HEAD_' + tag.upper().replace('-', '_') +def noteheadtype(tag): + if tag == 'breve': + return 'HEAD_BREVIS' + return 'HEAD_' + tag.upper() + def shortcut(tag): if tag == null or not tag: return '0' @@ -530,11 +544,25 @@ def shortcut(tag): for drum in drumsets[standard_drumset_id].values(): pitch = drum['pitch'] + custom_noteheads_code = '' + + for duration in ['whole', 'half', 'quarter', 'breve']: + notehead = drum[duration] + + if not notehead or notehead is null: + continue + + type = noteheadtype(duration) + + custom_noteheads_code += f"""\ + smDrumset->drum({pitch}).noteheads[static_cast(NoteHeadType::{type})] = SymNames::symIdByName("{notehead}"); +""" + gen_code += f""" // {drum['drum']} smDrumset->drum({pitch}) = DrumInstrument( TConv::userName(DrumNum({pitch})), - NoteHeadGroup::{noteheadgroup(drum['head'])}, + NoteHeadGroup::{noteheadgroup('custom' if custom_noteheads_code else drum['head'])}, /*line*/ {drum['line']}, DirectionV::{direction(drum['stem'])}, /*panelRow*/ {drum['row']}, @@ -543,6 +571,9 @@ def shortcut(tag): /*shortcut*/ {shortcut(drum['shortcut'])}); """ + if custom_noteheads_code: + gen_code += '\n' + custom_noteheads_code + with open(standard_drumset_cpp_path, newline='\n', encoding='utf-8') as file: old_code = file.read() diff --git a/src/engraving/dom/drumset.cpp b/src/engraving/dom/drumset.cpp index e5172695a5817..823cf42530a47 100644 --- a/src/engraving/dom/drumset.cpp +++ b/src/engraving/dom/drumset.cpp @@ -302,27 +302,120 @@ void Drumset::initDrumset() // BEGIN GENERATED CODE + // Laser (High Q) + smDrumset->drum(27) = DrumInstrument( + TConv::userName(DrumNum(27)), + NoteHeadGroup::HEAD_SLASH, + /*line*/ 8, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 0, + /*voice*/ 0, + /*shortcut*/ 0); + + // Slap + smDrumset->drum(28) = DrumInstrument( + TConv::userName(DrumNum(28)), + NoteHeadGroup::HEAD_CUSTOM, + /*line*/ 4, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 1, + /*voice*/ 0, + /*shortcut*/ 0); + + smDrumset->drum(28).noteheads[static_cast(NoteHeadType::HEAD_WHOLE)] = SymNames::symIdByName("noteheadSlashX"); + smDrumset->drum(28).noteheads[static_cast(NoteHeadType::HEAD_HALF)] = SymNames::symIdByName("noteheadSlashX"); + smDrumset->drum(28).noteheads[static_cast(NoteHeadType::HEAD_QUARTER)] = SymNames::symIdByName("noteheadSlashX"); + smDrumset->drum(28).noteheads[static_cast(NoteHeadType::HEAD_BREVIS)] = SymNames::symIdByName("noteheadSlashX"); + + // Scratch Push + smDrumset->drum(29) = DrumInstrument( + TConv::userName(DrumNum(29)), + NoteHeadGroup::HEAD_SLASH, + /*line*/ 6, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 2, + /*voice*/ 0, + /*shortcut*/ 0); + + // Scratch Pull + smDrumset->drum(30) = DrumInstrument( + TConv::userName(DrumNum(30)), + NoteHeadGroup::HEAD_SLASH, + /*line*/ 6, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 3, + /*voice*/ 0, + /*shortcut*/ 0); + + // Sticks + smDrumset->drum(31) = DrumInstrument( + TConv::userName(DrumNum(31)), + NoteHeadGroup::HEAD_PLUS, + /*line*/ -1, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 4, + /*voice*/ 0, + /*shortcut*/ 0); + + // Square Click + smDrumset->drum(32) = DrumInstrument( + TConv::userName(DrumNum(32)), + NoteHeadGroup::HEAD_PLUS, + /*line*/ 10, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 5, + /*voice*/ 0, + /*shortcut*/ 0); + + // Metronome Click + smDrumset->drum(33) = DrumInstrument( + TConv::userName(DrumNum(33)), + NoteHeadGroup::HEAD_CROSS, + /*line*/ 10, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 6, + /*voice*/ 0, + /*shortcut*/ 0); + + // Metronome Bell + smDrumset->drum(34) = DrumInstrument( + TConv::userName(DrumNum(34)), + NoteHeadGroup::HEAD_TRIANGLE_UP, + /*line*/ 10, + DirectionV::UP, + /*panelRow*/ 0, + /*panelColumn*/ 7, + /*voice*/ 0, + /*shortcut*/ 0); + // Acoustic Bass Drum smDrumset->drum(35) = DrumInstrument( TConv::userName(DrumNum(35)), NoteHeadGroup::HEAD_NORMAL, /*line*/ 8, - DirectionV::DOWN, - /*panelRow*/ 2, - /*panelColumn*/ 1, - /*voice*/ 1, + DirectionV::UP, + /*panelRow*/ 1, + /*panelColumn*/ 0, + /*voice*/ 0, /*shortcut*/ 0); - // Bass Drum 1 + // Electric Bass Drum smDrumset->drum(36) = DrumInstrument( TConv::userName(DrumNum(36)), NoteHeadGroup::HEAD_NORMAL, /*line*/ 7, DirectionV::DOWN, - /*panelRow*/ 2, - /*panelColumn*/ 0, + /*panelRow*/ 1, + /*panelColumn*/ 1, /*voice*/ 1, - /*shortcut*/ Key_B); + /*shortcut*/ 0); // Side Stick smDrumset->drum(37) = DrumInstrument( @@ -331,7 +424,7 @@ void Drumset::initDrumset() /*line*/ 3, DirectionV::UP, /*panelRow*/ 1, - /*panelColumn*/ 1, + /*panelColumn*/ 2, /*voice*/ 0, /*shortcut*/ 0); @@ -342,9 +435,20 @@ void Drumset::initDrumset() /*line*/ 3, DirectionV::UP, /*panelRow*/ 1, - /*panelColumn*/ 0, + /*panelColumn*/ 3, + /*voice*/ 0, + /*shortcut*/ 0); + + // Hand Clap + smDrumset->drum(39) = DrumInstrument( + TConv::userName(DrumNum(39)), + NoteHeadGroup::HEAD_PLUS, + /*line*/ -2, + DirectionV::UP, + /*panelRow*/ 1, + /*panelColumn*/ 4, /*voice*/ 0, - /*shortcut*/ Key_A); + /*shortcut*/ 0); // Electric Snare smDrumset->drum(40) = DrumInstrument( @@ -352,8 +456,8 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_SLASH, /*line*/ 3, DirectionV::UP, - /*panelRow*/ 2, - /*panelColumn*/ 6, + /*panelRow*/ 1, + /*panelColumn*/ 5, /*voice*/ 0, /*shortcut*/ 0); @@ -361,45 +465,45 @@ void Drumset::initDrumset() smDrumset->drum(41) = DrumInstrument( TConv::userName(DrumNum(41)), NoteHeadGroup::HEAD_NORMAL, - /*line*/ 6, + /*line*/ 5, DirectionV::UP, /*panelRow*/ 1, - /*panelColumn*/ 7, + /*panelColumn*/ 6, /*voice*/ 0, /*shortcut*/ 0); - // Closed Hi-Hat + // Closed Hi-hat smDrumset->drum(42) = DrumInstrument( TConv::userName(DrumNum(42)), NoteHeadGroup::HEAD_CROSS, /*line*/ -1, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 0, + /*panelRow*/ 1, + /*panelColumn*/ 7, /*voice*/ 0, - /*shortcut*/ Key_G); + /*shortcut*/ 0); // High Floor Tom smDrumset->drum(43) = DrumInstrument( TConv::userName(DrumNum(43)), NoteHeadGroup::HEAD_NORMAL, - /*line*/ 5, + /*line*/ 6, DirectionV::UP, - /*panelRow*/ 1, - /*panelColumn*/ 6, + /*panelRow*/ 2, + /*panelColumn*/ 0, /*voice*/ 0, /*shortcut*/ 0); - // Pedal Hi-Hat + // Pedal Hi-hat smDrumset->drum(44) = DrumInstrument( TConv::userName(DrumNum(44)), NoteHeadGroup::HEAD_CROSS, /*line*/ 9, - DirectionV::DOWN, + DirectionV::UP, /*panelRow*/ 2, - /*panelColumn*/ 2, + /*panelColumn*/ 1, /*voice*/ 1, - /*shortcut*/ Key_F); + /*shortcut*/ 0); // Low Tom smDrumset->drum(45) = DrumInstrument( @@ -407,19 +511,19 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_NORMAL, /*line*/ 4, DirectionV::UP, - /*panelRow*/ 1, - /*panelColumn*/ 5, + /*panelRow*/ 2, + /*panelColumn*/ 2, /*voice*/ 0, /*shortcut*/ 0); - // Open Hi-Hat + // Open Hi-hat smDrumset->drum(46) = DrumInstrument( TConv::userName(DrumNum(46)), NoteHeadGroup::HEAD_XCIRCLE, /*line*/ -1, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 1, + /*panelRow*/ 2, + /*panelColumn*/ 3, /*voice*/ 0, /*shortcut*/ 0); @@ -429,7 +533,7 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_NORMAL, /*line*/ 2, DirectionV::UP, - /*panelRow*/ 1, + /*panelRow*/ 2, /*panelColumn*/ 4, /*voice*/ 0, /*shortcut*/ 0); @@ -440,8 +544,8 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_NORMAL, /*line*/ 1, DirectionV::UP, - /*panelRow*/ 1, - /*panelColumn*/ 3, + /*panelRow*/ 2, + /*panelColumn*/ 5, /*voice*/ 0, /*shortcut*/ 0); @@ -451,10 +555,10 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_CROSS, /*line*/ -2, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 4, + /*panelRow*/ 2, + /*panelColumn*/ 6, /*voice*/ 0, - /*shortcut*/ Key_C); + /*shortcut*/ 0); // High Tom smDrumset->drum(50) = DrumInstrument( @@ -462,10 +566,10 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_NORMAL, /*line*/ 0, DirectionV::UP, - /*panelRow*/ 1, - /*panelColumn*/ 2, + /*panelRow*/ 2, + /*panelColumn*/ 7, /*voice*/ 0, - /*shortcut*/ Key_E); + /*shortcut*/ 0); // Ride Cymbal 1 smDrumset->drum(51) = DrumInstrument( @@ -473,30 +577,35 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_CROSS, /*line*/ 0, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 2, + /*panelRow*/ 3, + /*panelColumn*/ 0, /*voice*/ 0, - /*shortcut*/ Key_D); + /*shortcut*/ 0); - // Chinese Cymbal + // China Cymbal smDrumset->drum(52) = DrumInstrument( TConv::userName(DrumNum(52)), - NoteHeadGroup::HEAD_CROSS, - /*line*/ -4, + NoteHeadGroup::HEAD_CUSTOM, + /*line*/ -3, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 6, + /*panelRow*/ 3, + /*panelColumn*/ 1, /*voice*/ 0, /*shortcut*/ 0); + smDrumset->drum(52).noteheads[static_cast(NoteHeadType::HEAD_WHOLE)] = SymNames::symIdByName("noteheadHeavyXHat"); + smDrumset->drum(52).noteheads[static_cast(NoteHeadType::HEAD_HALF)] = SymNames::symIdByName("noteheadHeavyXHat"); + smDrumset->drum(52).noteheads[static_cast(NoteHeadType::HEAD_QUARTER)] = SymNames::symIdByName("noteheadHeavyXHat"); + smDrumset->drum(52).noteheads[static_cast(NoteHeadType::HEAD_BREVIS)] = SymNames::symIdByName("noteheadHeavyXHat"); + // Ride Bell smDrumset->drum(53) = DrumInstrument( TConv::userName(DrumNum(53)), NoteHeadGroup::HEAD_DIAMOND, /*line*/ 0, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 3, + /*panelRow*/ 3, + /*panelColumn*/ 2, /*voice*/ 0, /*shortcut*/ 0); @@ -504,10 +613,10 @@ void Drumset::initDrumset() smDrumset->drum(54) = DrumInstrument( TConv::userName(DrumNum(54)), NoteHeadGroup::HEAD_DIAMOND, - /*line*/ 1, + /*line*/ 6, DirectionV::UP, - /*panelRow*/ 2, - /*panelColumn*/ 4, + /*panelRow*/ 3, + /*panelColumn*/ 3, /*voice*/ 0, /*shortcut*/ 0); @@ -515,10 +624,10 @@ void Drumset::initDrumset() smDrumset->drum(55) = DrumInstrument( TConv::userName(DrumNum(55)), NoteHeadGroup::HEAD_CROSS, - /*line*/ -5, + /*line*/ -4, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 7, + /*panelRow*/ 3, + /*panelColumn*/ 4, /*voice*/ 0, /*shortcut*/ 0); @@ -526,10 +635,10 @@ void Drumset::initDrumset() smDrumset->drum(56) = DrumInstrument( TConv::userName(DrumNum(56)), NoteHeadGroup::HEAD_TRIANGLE_DOWN, - /*line*/ 1, + /*line*/ 0, DirectionV::UP, - /*panelRow*/ 2, - /*panelColumn*/ 3, + /*panelRow*/ 3, + /*panelColumn*/ 5, /*voice*/ 0, /*shortcut*/ 0); @@ -539,8 +648,19 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_CROSS, /*line*/ -3, DirectionV::UP, - /*panelRow*/ 0, - /*panelColumn*/ 5, + /*panelRow*/ 3, + /*panelColumn*/ 6, + /*voice*/ 0, + /*shortcut*/ 0); + + // Vibraslap + smDrumset->drum(58) = DrumInstrument( + TConv::userName(DrumNum(58)), + NoteHeadGroup::HEAD_TI, + /*line*/ 0, + DirectionV::UP, + /*panelRow*/ 3, + /*panelColumn*/ 7, /*voice*/ 0, /*shortcut*/ 0); @@ -550,11 +670,329 @@ void Drumset::initDrumset() NoteHeadGroup::HEAD_CROSS, /*line*/ 2, DirectionV::UP, - /*panelRow*/ 2, + /*panelRow*/ 4, + /*panelColumn*/ 0, + /*voice*/ 0, + /*shortcut*/ 0); + + // High Bongo + smDrumset->drum(60) = DrumInstrument( + TConv::userName(DrumNum(60)), + NoteHeadGroup::HEAD_NORMAL, + /*line*/ -1, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 1, + /*voice*/ 0, + /*shortcut*/ 0); + + // Low Bongo + smDrumset->drum(61) = DrumInstrument( + TConv::userName(DrumNum(61)), + NoteHeadGroup::HEAD_NORMAL, + /*line*/ 0, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 2, + /*voice*/ 0, + /*shortcut*/ 0); + + // Mute High Conga + smDrumset->drum(62) = DrumInstrument( + TConv::userName(DrumNum(62)), + NoteHeadGroup::HEAD_CUSTOM, + /*line*/ 1, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 3, + /*voice*/ 0, + /*shortcut*/ 0); + + smDrumset->drum(62).noteheads[static_cast(NoteHeadType::HEAD_WHOLE)] = SymNames::symIdByName("noteheadXOrnate"); + smDrumset->drum(62).noteheads[static_cast(NoteHeadType::HEAD_HALF)] = SymNames::symIdByName("noteheadXOrnate"); + smDrumset->drum(62).noteheads[static_cast(NoteHeadType::HEAD_QUARTER)] = SymNames::symIdByName("noteheadXOrnate"); + smDrumset->drum(62).noteheads[static_cast(NoteHeadType::HEAD_BREVIS)] = SymNames::symIdByName("noteheadXOrnate"); + + // Open High Conga + smDrumset->drum(63) = DrumInstrument( + TConv::userName(DrumNum(63)), + NoteHeadGroup::HEAD_NORMAL, + /*line*/ 1, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 4, + /*voice*/ 0, + /*shortcut*/ 0); + + // Low Conga + smDrumset->drum(64) = DrumInstrument( + TConv::userName(DrumNum(64)), + NoteHeadGroup::HEAD_NORMAL, + /*line*/ 2, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 5, + /*voice*/ 0, + /*shortcut*/ 0); + + // High Timbale + smDrumset->drum(65) = DrumInstrument( + TConv::userName(DrumNum(65)), + NoteHeadGroup::HEAD_NORMAL, + /*line*/ 5, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 6, + /*voice*/ 0, + /*shortcut*/ 0); + + // Low Timbale + smDrumset->drum(66) = DrumInstrument( + TConv::userName(DrumNum(66)), + NoteHeadGroup::HEAD_NORMAL, + /*line*/ 7, + DirectionV::UP, + /*panelRow*/ 4, + /*panelColumn*/ 7, + /*voice*/ 0, + /*shortcut*/ 0); + + // High Agogô + smDrumset->drum(67) = DrumInstrument( + TConv::userName(DrumNum(67)), + NoteHeadGroup::HEAD_TRIANGLE_DOWN, + /*line*/ -2, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 0, + /*voice*/ 0, + /*shortcut*/ 0); + + // Low Agogô + smDrumset->drum(68) = DrumInstrument( + TConv::userName(DrumNum(68)), + NoteHeadGroup::HEAD_TRIANGLE_DOWN, + /*line*/ -1, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 1, + /*voice*/ 0, + /*shortcut*/ 0); + + // Cabasa + smDrumset->drum(69) = DrumInstrument( + TConv::userName(DrumNum(69)), + NoteHeadGroup::HEAD_DIAMOND, + /*line*/ 2, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 2, + /*voice*/ 0, + /*shortcut*/ 0); + + // Maracas + smDrumset->drum(70) = DrumInstrument( + TConv::userName(DrumNum(70)), + NoteHeadGroup::HEAD_DIAMOND, + /*line*/ 4, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 3, + /*voice*/ 0, + /*shortcut*/ 0); + + // Short Whistle + smDrumset->drum(71) = DrumInstrument( + TConv::userName(DrumNum(71)), + NoteHeadGroup::HEAD_CROSS, + /*line*/ -3, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 4, + /*voice*/ 0, + /*shortcut*/ 0); + + // Long Whistle + smDrumset->drum(72) = DrumInstrument( + TConv::userName(DrumNum(72)), + NoteHeadGroup::HEAD_TI, + /*line*/ -3, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 5, + /*voice*/ 0, + /*shortcut*/ 0); + + // Short Güiro + smDrumset->drum(73) = DrumInstrument( + TConv::userName(DrumNum(73)), + NoteHeadGroup::HEAD_CROSS, + /*line*/ -1, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 6, + /*voice*/ 0, + /*shortcut*/ 0); + + // Long Güiro + smDrumset->drum(74) = DrumInstrument( + TConv::userName(DrumNum(74)), + NoteHeadGroup::HEAD_SLASHED1, + /*line*/ -1, + DirectionV::UP, + /*panelRow*/ 5, + /*panelColumn*/ 7, + /*voice*/ 0, + /*shortcut*/ 0); + + // Claves + smDrumset->drum(75) = DrumInstrument( + TConv::userName(DrumNum(75)), + NoteHeadGroup::HEAD_LA, + /*line*/ 0, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 0, + /*voice*/ 0, + /*shortcut*/ 0); + + // High Woodblock + smDrumset->drum(76) = DrumInstrument( + TConv::userName(DrumNum(76)), + NoteHeadGroup::HEAD_LA, + /*line*/ 5, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 1, + /*voice*/ 0, + /*shortcut*/ 0); + + // Low Woodblock + smDrumset->drum(77) = DrumInstrument( + TConv::userName(DrumNum(77)), + NoteHeadGroup::HEAD_LA, + /*line*/ 7, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 2, + /*voice*/ 0, + /*shortcut*/ 0); + + // Mute Cuica + smDrumset->drum(78) = DrumInstrument( + TConv::userName(DrumNum(78)), + NoteHeadGroup::HEAD_CROSS, + /*line*/ 8, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 3, + /*voice*/ 0, + /*shortcut*/ 0); + + // Open Cuica + smDrumset->drum(79) = DrumInstrument( + TConv::userName(DrumNum(79)), + NoteHeadGroup::HEAD_SLASHED2, + /*line*/ 8, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 4, + /*voice*/ 0, + /*shortcut*/ 0); + + // Mute Triangle + smDrumset->drum(80) = DrumInstrument( + TConv::userName(DrumNum(80)), + NoteHeadGroup::HEAD_CROSS, + /*line*/ 0, + DirectionV::UP, + /*panelRow*/ 6, /*panelColumn*/ 5, /*voice*/ 0, /*shortcut*/ 0); + // Open Triangle + smDrumset->drum(81) = DrumInstrument( + TConv::userName(DrumNum(81)), + NoteHeadGroup::HEAD_TRIANGLE_UP, + /*line*/ 0, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 6, + /*voice*/ 0, + /*shortcut*/ 0); + + // Shaker + smDrumset->drum(82) = DrumInstrument( + TConv::userName(DrumNum(82)), + NoteHeadGroup::HEAD_DIAMOND, + /*line*/ 5, + DirectionV::UP, + /*panelRow*/ 6, + /*panelColumn*/ 7, + /*voice*/ 0, + /*shortcut*/ 0); + + // Jingle Bell + smDrumset->drum(83) = DrumInstrument( + TConv::userName(DrumNum(83)), + NoteHeadGroup::HEAD_TRIANGLE_DOWN, + /*line*/ 3, + DirectionV::UP, + /*panelRow*/ 7, + /*panelColumn*/ 0, + /*voice*/ 0, + /*shortcut*/ 0); + + // Belltree + smDrumset->drum(84) = DrumInstrument( + TConv::userName(DrumNum(84)), + NoteHeadGroup::HEAD_TI, + /*line*/ 2, + DirectionV::UP, + /*panelRow*/ 7, + /*panelColumn*/ 1, + /*voice*/ 0, + /*shortcut*/ 0); + + // Castanets + smDrumset->drum(85) = DrumInstrument( + TConv::userName(DrumNum(85)), + NoteHeadGroup::HEAD_LA, + /*line*/ 2, + DirectionV::UP, + /*panelRow*/ 7, + /*panelColumn*/ 2, + /*voice*/ 0, + /*shortcut*/ 0); + + // Mute Surdo + smDrumset->drum(86) = DrumInstrument( + TConv::userName(DrumNum(86)), + NoteHeadGroup::HEAD_CUSTOM, + /*line*/ 4, + DirectionV::UP, + /*panelRow*/ 7, + /*panelColumn*/ 3, + /*voice*/ 0, + /*shortcut*/ 0); + + smDrumset->drum(86).noteheads[static_cast(NoteHeadType::HEAD_WHOLE)] = SymNames::symIdByName("noteheadSlashX"); + smDrumset->drum(86).noteheads[static_cast(NoteHeadType::HEAD_HALF)] = SymNames::symIdByName("noteheadSlashX"); + smDrumset->drum(86).noteheads[static_cast(NoteHeadType::HEAD_QUARTER)] = SymNames::symIdByName("noteheadSlashX"); + smDrumset->drum(86).noteheads[static_cast(NoteHeadType::HEAD_BREVIS)] = SymNames::symIdByName("noteheadSlashX"); + + // Open Surdo + smDrumset->drum(87) = DrumInstrument( + TConv::userName(DrumNum(87)), + NoteHeadGroup::HEAD_SLASH, + /*line*/ 4, + DirectionV::UP, + /*panelRow*/ 7, + /*panelColumn*/ 4, + /*voice*/ 0, + /*shortcut*/ 0); + // END GENERATED CODE } } diff --git a/src/engraving/dom/instrtemplate.cpp b/src/engraving/dom/instrtemplate.cpp index eec5d762c7ac1..e5433094b6def 100644 --- a/src/engraving/dom/instrtemplate.cpp +++ b/src/engraving/dom/instrtemplate.cpp @@ -902,9 +902,15 @@ const InstrumentTemplate* searchTemplateForInstrNameList(const std::list } if (!bestMatch) { + static const std::wregex drumsetRegex(L"drum ?(set|kit)", std::regex_constants::icase); + for (const String& name : nameList) { - if (name.contains(u"drum", muse::CaseInsensitive)) { - return searchTemplate(u"drumset"); + if (name.contains(drumsetRegex)) { + return searchTemplate(u"drumset"); // Large Drum Kit + } + + if (name.contains(u"drum", muse::CaseInsensitive) || name.contains(u"percussion", muse::CaseInsensitive)) { + return searchTemplate(u"percussion-synthesizer"); // General MIDI percussion } if (name.contains(u"piano", muse::CaseInsensitive)) { diff --git a/src/engraving/dom/instrument.cpp b/src/engraving/dom/instrument.cpp index ddf97963bf08f..f0f2c8d3b2e4d 100644 --- a/src/engraving/dom/instrument.cpp +++ b/src/engraving/dom/instrument.cpp @@ -154,7 +154,10 @@ StaffName::StaffName(const String& xmlText, int pos) String Instrument::recognizeMusicXmlId() const { + // Return a MusicXML "Sound ID", which is essentially an instrument ID. + // See https://github.com/w3c/musicxml/blob/gh-pages/schema/sounds.xml static const String defaultMusicXmlId(u"keyboard.piano"); + static const String defaultMusicXmlPercussionId(u"drum.group"); // our General MIDI Percussion std::list nameList; @@ -181,12 +184,7 @@ String Instrument::recognizeMusicXmlId() const return tmplMidiProgram->musicXmlId; } - if (m_useDrumset) { - static const String drumsetId(u"drumset"); - return drumsetId; - } - - return defaultMusicXmlId; + return m_useDrumset ? defaultMusicXmlPercussionId : defaultMusicXmlId; } String Instrument::recognizeId() const @@ -194,9 +192,16 @@ String Instrument::recognizeId() const // When reading a score created with pre-3.6, MuseScore's instrument ID // isn't saved in the score file, so we must try to guess the ID based on // the MusicXML ID, which is saved. However, MusicXML IDs are not unique, - // so we must also consider other data to find the best match. - - if (m_musicXmlId.startsWith(u"mdl.")) { + // so we must also consider other data to find the best match, preferring + // more generic instruments when there's a tie. + + // In these cases, the best and/or most generic match is already known, + // and we don't want to risk returning something else. + if (m_musicXmlId == u"drum.group") { + return u"percussion-synthesizer"; // General MIDI Percussion (most generic kit) + } else if (m_musicXmlId == u"drum.group.set") { + return u"drumset"; // Large Drum Kit (most generic drum kit) + } else if (m_musicXmlId.startsWith(u"mdl.")) { // Use fixed mapping for MDL1 instruments to ensure we get the // marching versions (e.g. "marching-snare" and not "snare-drum"). // See https://github.com/musescore/mdl/blob/master/resources/instruments/mdl_1_3_0.xml @@ -267,7 +272,13 @@ String Instrument::recognizeId() const } } - return fallback.isEmpty() ? String(u"piano") : fallback; + if (!fallback.isEmpty()) { + return fallback; + } + + return m_useDrumset + ? u"percussion-synthesizer" // General MIDI Percussion (most generic kit) + : u"piano"; } int Instrument::recognizeMidiProgram() const diff --git a/src/importexport/guitarpro/tests/data/all-percussion.gp-ref.mscx b/src/importexport/guitarpro/tests/data/all-percussion.gp-ref.mscx index 965d54a9573b7..79ce1468b6256 100644 --- a/src/importexport/guitarpro/tests/data/all-percussion.gp-ref.mscx +++ b/src/importexport/guitarpro/tests/data/all-percussion.gp-ref.mscx @@ -25,11 +25,11 @@ PERC Percussions - + Percussions drm. - metal.brake-drums + drum.group 1 normal diff --git a/src/importexport/guitarpro/tests/data/all-percussion.gp5-ref.mscx b/src/importexport/guitarpro/tests/data/all-percussion.gp5-ref.mscx index 4568b94c2aed1..29eedde499c18 100644 --- a/src/importexport/guitarpro/tests/data/all-percussion.gp5-ref.mscx +++ b/src/importexport/guitarpro/tests/data/all-percussion.gp5-ref.mscx @@ -25,10 +25,10 @@ PERC Percussions - + Percussions - metal.brake-drums + drum.group 1 normal diff --git a/src/importexport/guitarpro/tests/data/all-percussion.gpx-ref.mscx b/src/importexport/guitarpro/tests/data/all-percussion.gpx-ref.mscx index 1251145529b85..ceef86452fc5c 100644 --- a/src/importexport/guitarpro/tests/data/all-percussion.gpx-ref.mscx +++ b/src/importexport/guitarpro/tests/data/all-percussion.gpx-ref.mscx @@ -1049,7 +1049,7 @@ Timbale tmblKit - drumset + drum.group 1 normal @@ -1559,7 +1559,7 @@ Agogo agogoKit - drumset + drum.group 1 normal @@ -3089,7 +3089,7 @@ Whistle whstlKit - drumset + drum.group 1 normal @@ -6659,7 +6659,7 @@ Shaker shkr - drumset + drum.group 1 normal @@ -7169,7 +7169,7 @@ Jingle Bell jngl-bell - drumset + drum.group 1 normal @@ -8189,7 +8189,7 @@ Woodblock wdblckKit - drumset + drum.group 1 normal @@ -8699,7 +8699,7 @@ Guiro guiro - drumset + drum.group 1 normal @@ -9719,7 +9719,7 @@ Surdo surdo - drumset + drum.group 1 normal diff --git a/src/importexport/guitarpro/tests/data/percussion-beams.gp-ref.mscx b/src/importexport/guitarpro/tests/data/percussion-beams.gp-ref.mscx index 64fff0d498680..4d6026d1fb291 100644 --- a/src/importexport/guitarpro/tests/data/percussion-beams.gp-ref.mscx +++ b/src/importexport/guitarpro/tests/data/percussion-beams.gp-ref.mscx @@ -25,11 +25,11 @@ PERC Drums - + Drums Drums - drum.group.set + drum.group 1 normal diff --git a/src/importexport/musicxml/tests/data/testFinaleInstr_ref.mscx b/src/importexport/musicxml/tests/data/testFinaleInstr_ref.mscx index 5d14e819430dc..dcd0f104dd10d 100644 --- a/src/importexport/musicxml/tests/data/testFinaleInstr_ref.mscx +++ b/src/importexport/musicxml/tests/data/testFinaleInstr_ref.mscx @@ -1258,50 +1258,92 @@ 1 Percussion 1 - + Percussion 1 Perc. 1 Percussion 1 - drum.group.set + drum.group 1 - cross - -1 + slash + 8 0 - Closed Hi-Hat + High Q 1 - G 0 - 2 + 0 - cross - 9 - 1 - Pedal Hi-Hat - 2 - F + normal + 4 + 0 + Slap + 1 0 - 3 + 1 - cross - 1 + slash + 6 0 - Open Hi-Hat + Scratch Push 1 - E 0 - 4 + 2 + slash + 6 + 0 + Scratch Pull + 1 + 0 + 3 + + + plus + -1 + 0 + Sticks + 1 + 0 + 4 + + + plus + 10 + 0 + Square Click + 1 + 0 + 5 + + cross - 0 + 10 0 - Ride Cymbal 1 + Metronome Click 1 0 - 1 + 6 + + + triangle-up + 10 + 0 + Metronome Bell + 1 + 0 + 7 + + + normal + 8 + 0 + Acoustic Bass Drum + 1 + 1 + 0 normal @@ -1309,18 +1351,17 @@ 1 Bass Drum 1 2 - B - 2 - 0 + 1 + 1 - cross + slashed1 3 0 Side Stick 1 1 - 1 + 2 normal @@ -1328,404 +1369,1067 @@ 0 Acoustic Snare 1 - A 1 - 0 + 3 - - diamond - 2 + + plus + -2 0 - Tambourine + Hand Clap 1 1 - 2 + 4 - - cross - -3 + + slash + 3 0 - Splash Cymbal + Electric Snare 1 - 0 + 1 5 - - triangle-down - 1 + + normal + 5 0 - Cowbell + Low Floor Tom 1 1 - 3 + 6 - - diamond - 1 + + cross + -1 0 - Vibraslap + Closed Hi-Hat 1 1 - 6 + 7 - - cross - -2 + + normal + 6 0 - Hand Cymbals + High Floor Tom 1 - C - 0 + 2 0 - + cross - 2 - 0 - Mute High Conga + 9 + 1 + Pedal Hi-Hat 1 2 - 3 + 1 - - cross + + normal 4 0 - Open High Conga + Low Tom 1 2 2 - - cross - 6 + + xcircle + -1 0 - Low Conga + Open Hi-Hat 1 2 - 1 + 3 - + normal 2 0 - Maracas + Low-Mid Tom 1 2 - 5 + 4 - + normal - 0 + 1 0 - Claves + Hi-Mid Tom 1 - 1 - 4 + 2 + 5 - - diamond - 0 + + cross + -2 0 - Open Triangle + Crash Cymbal 1 1 - D - 0 + 2 6 - + normal - 4 + 0 0 - Shaker + High Tom 1 2 - 4 + 7 - + cross - 2 + 0 0 - Mark Tree + Ride Cymbal 1 1 - 0 - 7 + 3 + 0 - - normal - 1 + + cross + -3 0 - Castanets + Chinese Cymbal 1 - 1 - 5 + 3 + 1 - PERC - 0 - - 100 - 100 - - - 100 - 33 - - - 100 - 50 - - - 100 - 67 - - - 100 - 100 - - - 120 - 67 - - - 150 - 100 - - - 150 - 50 - - - 120 - 50 - - - 120 - 100 - - - - - - - - 16 - 0 - - - - - - - stdNormal - - 3 - 1 - - Percussion 2 - - Percussion 2 - Perc. 2 - Percussion 2 - drum.group.set - 1 - - cross - -1 + + diamond + 0 0 - Closed Hi-Hat + Ride Bell 1 - G - 0 + 3 2 - - cross - 9 - 1 - Pedal Hi-Hat - 2 - F - 0 + + diamond + 6 + 0 + Tambourine + 1 + 3 3 - + cross - 1 + -4 0 - Open Hi-Hat + Splash Cymbal 1 - E - 0 + 3 4 - - cross + + triangle-down + 0 + 0 + Cowbell + 1 + 3 + 5 + + + cross + -3 + 0 + Crash Cymbal 2 + 1 + 3 + 6 + + + ti + 0 + 0 + Vibraslap + 1 + 3 + 7 + + + cross + 2 + 0 + Ride Cymbal 2 + 1 + 4 + 0 + + + normal + -1 + 0 + Hi Bongo + 1 + 4 + 1 + + + normal 0 0 - Ride Cymbal 1 + Low Bongo + 1 + 4 + 2 + + + normal + 1 + 0 + Mute Hi Conga + 1 + 4 + 3 + + + normal + 1 + 0 + Open Hi Conga + 1 + 4 + 4 + + + normal + 2 + 0 + Low Conga + 1 + 4 + 5 + + + normal + 5 + 0 + High Timbale + 1 + 4 + 6 + + + normal + 7 + 0 + Low Timbale + 1 + 4 + 7 + + + triangle-down + -2 + 0 + High Agogo + 1 + 5 + 0 + + + triangle-down + -1 + 0 + Low Agogo + 1 + 5 + 1 + + + diamond + 2 + 0 + Cabasa + 1 + 5 + 2 + + + diamond + 4 + 0 + Maracas + 1 + 5 + 3 + + + cross + -3 + 0 + Short Whistle + 1 + 5 + 4 + + + ti + -3 + 0 + Long Whistle + 1 + 5 + 5 + + + cross + -1 + 0 + Short Güiro + 1 + 5 + 6 + + + slashed1 + -1 + 0 + Long Güiro + 1 + 5 + 7 + + + la + 0 + 0 + Claves + 1 + 6 + 0 + + + la + 5 + 0 + Hi Wood Block + 1 + 6 + 1 + + + la + 7 + 0 + Low Wood Block + 1 + 6 + 2 + + + cross + 8 + 0 + Mute Cuica + 1 + 6 + 3 + + + slashed2 + 8 + 0 + Open Cuica + 1 + 6 + 4 + + + cross + 0 + 0 + Mute Triangle + 1 + 6 + 5 + + + triangle-up + 0 + 0 + Open Triangle + 1 + 6 + 6 + + + diamond + 5 + 0 + Shaker + 1 + 6 + 7 + + + triangle-down + 3 + 0 + Sleigh Bell + 1 + 7 + 0 + + + ti + 2 + 0 + Mark Tree + 1 + 7 + 1 + + + la + 2 + 0 + Castanets + 1 + 7 + 2 + + + normal + 4 + 0 + Mute Surdo + 1 + 7 + 3 + + + slash + 4 + 0 + Open Surdo + 1 + 7 + 4 + + PERC + + 100 + 100 + + + 100 + 33 + + + 100 + 50 + + + 100 + 67 + + + 100 + 100 + + + 120 + 67 + + + 150 + 100 + + + 150 + 50 + + + 120 + 50 + + + 120 + 100 + + + + + + + + 16 + 0 + + + + + + + stdNormal + + 3 + 1 + + Percussion 2 + + Percussion 2 + Perc. 2 + Percussion 2 + drum.group + 1 + + slash + 8 + 0 + High Q + 1 + 0 + 0 + + + normal + 4 + 0 + Slap + 1 + 0 + 1 + + + slash + 6 + 0 + Scratch Push + 1 + 0 + 2 + + + slash + 6 + 0 + Scratch Pull + 1 + 0 + 3 + + + plus + -1 + 0 + Sticks + 1 + 0 + 4 + + + plus + 10 + 0 + Square Click + 1 + 0 + 5 + + + cross + 10 + 0 + Metronome Click + 1 + 0 + 6 + + + triangle-up + 10 + 0 + Metronome Bell + 1 + 0 + 7 + + + normal + 8 + 0 + Acoustic Bass Drum + 1 + 1 + 0 + + + normal + 7 + 1 + Bass Drum 1 + 2 + 1 + 1 + + + slashed1 + 3 + 0 + Side Stick + 1 + 1 + 2 + + + normal + 3 + 0 + Acoustic Snare + 1 + 1 + 3 + + + plus + -2 + 0 + Hand Clap + 1 + 1 + 4 + + + slash + 3 + 0 + Electric Snare + 1 + 1 + 5 + + + normal + 5 + 0 + Low Floor Tom + 1 + 1 + 6 + + + cross + -1 + 0 + Closed Hi-Hat + 1 + 1 + 7 + + + normal + 6 + 0 + High Floor Tom 1 - 0 + 2 + 0 + + + cross + 9 + 1 + Pedal Hi-Hat + 1 + 2 1 - + normal - 7 - 1 - Bass Drum 1 - 2 - B + 4 + 0 + Low Tom + 1 2 - 0 + 2 - + + xcircle + -1 + 0 + Open Hi-Hat + 1 + 2 + 3 + + + normal + 2 + 0 + Low-Mid Tom + 1 + 2 + 4 + + + normal + 1 + 0 + Hi-Mid Tom + 1 + 2 + 5 + + cross - 3 + -2 0 - Side Stick + Crash Cymbal 1 1 - 1 - 1 + 2 + 6 - + normal - 3 + 0 0 - Acoustic Snare + High Tom 1 - A - 1 + 2 + 7 + + + cross + 0 + 0 + Ride Cymbal 1 + 1 + 3 0 + + cross + -3 + 0 + Chinese Cymbal + 1 + 3 + 1 + + + diamond + 0 + 0 + Ride Bell + 1 + 3 + 2 + diamond - 2 + 6 0 Tambourine 1 - 1 - 2 + 3 + 3 cross - -3 + -4 0 Splash Cymbal 1 - 0 - 5 + 3 + 4 triangle-down - 1 + 0 0 Cowbell 1 - 1 - 3 + 3 + 5 + + + cross + -3 + 0 + Crash Cymbal 2 + 1 + 3 + 6 - diamond - 1 + ti + 0 0 Vibraslap 1 - 1 - 6 + 3 + 7 cross - -2 + 2 0 - Hand Cymbals + Ride Cymbal 2 1 - C - 0 + 4 0 + + normal + -1 + 0 + Hi Bongo + 1 + 4 + 1 + + + normal + 0 + 0 + Low Bongo + 1 + 4 + 2 + - cross - 2 + normal + 1 0 - Mute High Conga + Mute Hi Conga 1 - 2 + 4 3 - cross - 4 + normal + 1 0 - Open High Conga + Open Hi Conga 1 - 2 - 2 + 4 + 4 - cross - 6 + normal + 2 0 Low Conga 1 - 2 - 1 + 4 + 5 - + + normal + 5 + 0 + High Timbale + 1 + 4 + 6 + + normal + 7 + 0 + Low Timbale + 1 + 4 + 7 + + + triangle-down + -2 + 0 + High Agogo + 1 + 5 + 0 + + + triangle-down + -1 + 0 + Low Agogo + 1 + 5 + 1 + + + diamond 2 0 + Cabasa + 1 + 5 + 2 + + + diamond + 4 + 0 Maracas 1 - 2 + 5 + 3 + + + cross + -3 + 0 + Short Whistle + 1 + 5 + 4 + + + ti + -3 + 0 + Long Whistle + 1 + 5 5 + + cross + -1 + 0 + Short Güiro + 1 + 5 + 6 + + + slashed1 + -1 + 0 + Long Güiro + 1 + 5 + 7 + - normal + la 0 0 Claves 1 - 1 + 6 + 0 + + + la + 5 + 0 + Hi Wood Block + 1 + 6 + 1 + + + la + 7 + 0 + Low Wood Block + 1 + 6 + 2 + + + cross + 8 + 0 + Mute Cuica + 1 + 6 + 3 + + + slashed2 + 8 + 0 + Open Cuica + 1 + 6 4 + + cross + 0 + 0 + Mute Triangle + 1 + 6 + 5 + - diamond + triangle-up 0 0 Open Triangle 1 - D - 0 + 6 6 - normal - 4 + diamond + 5 0 Shaker 1 - 2 - 4 + 6 + 7 + + + triangle-down + 3 + 0 + Sleigh Bell + 1 + 7 + 0 - cross + ti 2 0 Mark Tree 1 - 0 - 7 + 7 + 1 - normal - 1 + la + 2 0 Castanets 1 - 1 - 5 + 7 + 2 + + + normal + 4 + 0 + Mute Surdo + 1 + 7 + 3 + + + slash + 4 + 0 + Open Surdo + 1 + 7 + 4 PERC - 0 100 100 diff --git a/src/importexport/musicxml/tests/data/testImportDrums2_ref.mscx b/src/importexport/musicxml/tests/data/testImportDrums2_ref.mscx index 6072a84d113d3..88d26464819ff 100644 --- a/src/importexport/musicxml/tests/data/testImportDrums2_ref.mscx +++ b/src/importexport/musicxml/tests/data/testImportDrums2_ref.mscx @@ -61,10 +61,10 @@ normal 8 1 - Acoustic Bass Drum + Bass Drum 2 2 - 2 - 1 + 1 + 0 normal @@ -73,7 +73,7 @@ Bass Drum 1 2 B - 2 + 0 0 @@ -92,8 +92,8 @@ Acoustic Snare 1 A - 1 - 0 + 0 + 1 slash @@ -102,7 +102,7 @@ Electric Snare 1 2 - 6 + 0 normal @@ -121,7 +121,7 @@ 1 G 0 - 0 + 2 normal @@ -129,8 +129,8 @@ 0 High Floor Tom 1 - 1 - 6 + 0 + 7 cross @@ -139,7 +139,7 @@ Pedal Hi-Hat 2 F - 2 + 1 2 @@ -149,7 +149,7 @@ Low Tom 1 1 - 5 + 6 xcircle @@ -158,7 +158,7 @@ Open Hi-Hat 1 0 - 1 + 3 normal @@ -167,7 +167,7 @@ Low-Mid Tom 1 1 - 4 + 5 normal @@ -175,8 +175,8 @@ 0 Hi-Mid Tom 1 - 1 - 3 + 0 + 6 cross @@ -196,7 +196,7 @@ 1 E 1 - 2 + 4 cross @@ -206,16 +206,16 @@ 1 D 0 - 2 + 5 cross -4 0 - Chinese Cymbal + China Cymbal 1 - 0 - 6 + 2 + 3 diamond @@ -223,8 +223,8 @@ 0 Ride Bell 1 - 0 - 3 + 2 + 5 diamond @@ -233,7 +233,7 @@ Tambourine 1 2 - 4 + 1 cross @@ -241,8 +241,8 @@ 0 Splash Cymbal 1 - 0 - 7 + 2 + 4 triangle-down @@ -251,7 +251,7 @@ Cowbell 1 2 - 3 + 2 cross @@ -259,8 +259,8 @@ 0 Crash Cymbal 2 1 - 0 - 5 + 1 + 3 cross @@ -269,7 +269,7 @@ Ride Cymbal 2 1 2 - 5 + 6 normal diff --git a/src/importexport/musicxml/tests/data/testImportDrums_ref.mscx b/src/importexport/musicxml/tests/data/testImportDrums_ref.mscx index 102baa14545cc..1eef547486b53 100644 --- a/src/importexport/musicxml/tests/data/testImportDrums_ref.mscx +++ b/src/importexport/musicxml/tests/data/testImportDrums_ref.mscx @@ -50,10 +50,10 @@ normal 8 1 - Acoustic Bass Drum + Bass Drum 2 2 - 2 - 1 + 1 + 0 normal @@ -62,7 +62,7 @@ Bass Drum 1 2 B - 2 + 0 0 @@ -81,8 +81,8 @@ Acoustic Snare 1 A - 1 - 0 + 0 + 1 slash @@ -91,7 +91,7 @@ Electric Snare 1 2 - 6 + 0 normal @@ -110,7 +110,7 @@ 1 G 0 - 0 + 2 normal @@ -118,8 +118,8 @@ 0 High Floor Tom 1 - 1 - 6 + 0 + 7 cross @@ -128,7 +128,7 @@ Pedal Hi-Hat 2 F - 2 + 1 2 @@ -138,7 +138,7 @@ Low Tom 1 1 - 5 + 6 xcircle @@ -147,7 +147,7 @@ Open Hi-Hat 1 0 - 1 + 3 normal @@ -156,7 +156,7 @@ Low-Mid Tom 1 1 - 4 + 5 normal @@ -164,8 +164,8 @@ 0 Hi-Mid Tom 1 - 1 - 3 + 0 + 6 cross @@ -185,7 +185,7 @@ 1 E 1 - 2 + 4 cross @@ -195,16 +195,16 @@ 1 D 0 - 2 + 5 cross -4 0 - Chinese Cymbal + China Cymbal 1 - 0 - 6 + 2 + 3 diamond @@ -212,8 +212,8 @@ 0 Ride Bell 1 - 0 - 3 + 2 + 5 diamond @@ -222,7 +222,7 @@ Tambourine 1 2 - 4 + 1 cross @@ -230,8 +230,8 @@ 0 Splash Cymbal 1 - 0 - 7 + 2 + 4 triangle-down @@ -240,7 +240,7 @@ Cowbell 1 2 - 3 + 2 cross @@ -248,8 +248,8 @@ 0 Crash Cymbal 2 1 - 0 - 5 + 1 + 3 cross @@ -258,7 +258,7 @@ Ride Cymbal 2 1 2 - 5 + 6 normal diff --git a/src/importexport/musicxml/tests/data/testInstrImport_ref.mscx b/src/importexport/musicxml/tests/data/testInstrImport_ref.mscx index dc42c32cbee37..0e64a1a4ea243 100644 --- a/src/importexport/musicxml/tests/data/testInstrImport_ref.mscx +++ b/src/importexport/musicxml/tests/data/testInstrImport_ref.mscx @@ -1145,9 +1145,8 @@ 0 Closed Hi-Hat 1 - G - 0 - 2 + 4 + 5 cross @@ -1155,41 +1154,47 @@ 1 Pedal Hi-Hat 2 - F - 0 - 3 + 4 + 7 - cross - 1 + xcircle + -1 0 Open Hi-Hat 1 - E - 0 - 4 + 4 + 6 cross 0 0 - Ride Cymbal 1 + Ride Cymbal 1 - 0 - 1 + 5 + 0 + + + plus + -1 + 0 + Stick Click + 1 + 4 + 4 normal 7 1 - Bass Drum 1 + Bass Drum 2 - B - 2 + 0 0 - cross + slashed1 3 0 Side Stick @@ -1201,139 +1206,328 @@ normal 3 0 - Acoustic Snare + Snare 1 - A - 1 - 0 + 0 + 1 diamond - 2 + 6 0 Tambourine 1 - 1 - 2 + 0 + 6 cross - -3 + -4 0 Splash Cymbal 1 - 0 - 5 + 5 + 1 triangle-down - 1 + 0 0 Cowbell 1 - 1 - 3 + 2 + 7 + + + cross + -2 + 0 + Suspended Cymbal + 1 + 0 + 4 - diamond - 1 + ti + 0 0 Vibraslap 1 1 - 6 + 3 cross - -2 + 4 0 Hand Cymbals 1 - C 0 - 0 + 5 + + + normal + -1 + 0 + Hi Bongo + 1 + 2 + 6 + + + normal + 0 + 0 + Lo Bongo + 1 + 2 + 5 - cross - 2 + normal + + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + noteheadXOrnate + + 1 0 - Mute High Conga + Mute Hi Conga 1 2 - 3 + 4 - cross - 4 + normal + 1 0 - Open High Conga + Hi Conga 1 2 - 2 + 3 - cross - 6 + normal + 2 + 0 + Lo Conga + 1 + 2 + 2 + + + normal + 5 0 - Low Conga + Hi Timbale 1 2 1 - + normal + 7 + 0 + Lo Timbale + 1 + 2 + 0 + + + triangle-down + -2 + 0 + Hi Agogô + 1 + 3 + 7 + + + triangle-down + -1 + 0 + Lo Agogô + 1 + 3 + 6 + + + diamond 2 0 + Cabasa + 1 + 1 + 6 + + + diamond + 4 + 0 Maracas 1 - 2 + 1 5 + + ti + -3 + 0 + Long Whistle + 1 + 4 + 2 + + + cross + -3 + 0 + Short Whistle + 1 + 4 + 3 + + + cross + -1 + 0 + Short Güiro + 1 + 3 + 5 + + + slashed1 + -1 + 0 + Long Güiro + 1 + 3 + 4 + - normal + la 0 0 Claves 1 - 1 - 4 + 0 + 7 + + + la + 5 + 0 + Hi Woodblock + 1 + 3 + 3 + + + la + 7 + 0 + Lo Woodblock + 1 + 3 + 2 + + + cross + 8 + 0 + Mute Cuica + 1 + 4 + 1 + + + slashed2 + 8 + 0 + Open Cuica + 1 + 4 + 0 + + + cross + 0 + 0 + Mute Triangle + 1 + 0 + 3 - diamond + triangle-up 0 0 - Open Triangle + Triangle 1 - D 0 - 6 + 2 - normal - 4 + diamond + 5 0 Shaker 1 - 2 + 1 4 + + triangle-down + 3 + 0 + Sleigh Bells + 1 + 1 + 2 + - cross + ti 2 0 Mark Tree 1 - 0 - 7 + 1 + 0 - normal - 1 + la + 2 0 Castanets 1 1 - 5 + 7 + + + normal + + noteheadSlashX + noteheadSlashX + noteheadSlashX + noteheadSlashX + + 4 + 0 + Mute Surdo + 1 + 3 + 1 + + + slash + 4 + 0 + Surdo + 1 + 3 + 0 PERC diff --git a/src/importexport/musicxml/tests/data/testStickingLyrics_ref.mscx b/src/importexport/musicxml/tests/data/testStickingLyrics_ref.mscx index bb8c8927253fe..c2e967bd31333 100644 --- a/src/importexport/musicxml/tests/data/testStickingLyrics_ref.mscx +++ b/src/importexport/musicxml/tests/data/testStickingLyrics_ref.mscx @@ -61,10 +61,10 @@ normal 8 1 - Acoustic Bass Drum + Bass Drum 2 2 - 2 - 1 + 1 + 0 normal @@ -73,7 +73,7 @@ Bass Drum 1 2 B - 2 + 0 0 @@ -92,8 +92,8 @@ Acoustic Snare 1 A - 1 - 0 + 0 + 1 slash @@ -102,7 +102,7 @@ Electric Snare 1 2 - 6 + 0 normal @@ -121,7 +121,7 @@ 1 G 0 - 0 + 2 normal @@ -129,8 +129,8 @@ 0 High Floor Tom 1 - 1 - 6 + 0 + 7 cross @@ -139,7 +139,7 @@ Pedal Hi-Hat 2 F - 2 + 1 2 @@ -149,7 +149,7 @@ Low Tom 1 1 - 5 + 6 xcircle @@ -158,7 +158,7 @@ Open Hi-Hat 1 0 - 1 + 3 normal @@ -167,7 +167,7 @@ Low-Mid Tom 1 1 - 4 + 5 normal @@ -175,8 +175,8 @@ 0 Hi-Mid Tom 1 - 1 - 3 + 0 + 6 cross @@ -196,7 +196,7 @@ 1 E 1 - 2 + 4 cross @@ -206,16 +206,16 @@ 1 D 0 - 2 + 5 cross -4 0 - Chinese Cymbal + China Cymbal 1 - 0 - 6 + 2 + 3 diamond @@ -223,8 +223,8 @@ 0 Ride Bell 1 - 0 - 3 + 2 + 5 diamond @@ -233,7 +233,7 @@ Tambourine 1 2 - 4 + 1 cross @@ -241,8 +241,8 @@ 0 Splash Cymbal 1 - 0 - 7 + 2 + 4 triangle-down @@ -251,7 +251,7 @@ Cowbell 1 2 - 3 + 2 cross @@ -259,8 +259,8 @@ 0 Crash Cymbal 2 1 - 0 - 5 + 1 + 3 cross @@ -269,7 +269,7 @@ Ride Cymbal 2 1 2 - 5 + 6 PERC 0 diff --git a/src/importexport/musicxml/tests/data/testVirtualInstruments_ref.xml b/src/importexport/musicxml/tests/data/testVirtualInstruments_ref.xml index b9a1526ba719b..abf7fb5a3054f 100644 --- a/src/importexport/musicxml/tests/data/testVirtualInstruments_ref.xml +++ b/src/importexport/musicxml/tests/data/testVirtualInstruments_ref.xml @@ -49,7 +49,7 @@ Drumset Drs. - Acoustic Bass Drum + Bass Drum 2 Bass Drum 1 @@ -97,7 +97,7 @@ Ride Cymbal 1 - Chinese Cymbal + China Cymbal Ride Bell