pub fn for_percussion_key_or_unmapped(key: u8) -> InstrumentExpand description
The instrument a key of the General MIDI percussion map plays, and a
bare unpitched percussion instrument carrying the key where the map
names nothing at all: music21’s midiPitchToInstrument asked with
raiseIfUnmapped=False, which is how its MIDI reader asks.
use music21::instrument::for_percussion_key_or_unmapped;
let bare = for_percussion_key_or_unmapped(22);
assert_eq!(bare.kind(), "UnpitchedPercussion");
assert_eq!(bare.name(), Some("Percussion"));
assert_eq!(bare.percussion_pitch(), Some(22));