pub struct PercussionInstrument {
pub id: String,
pub name: Option<String>,
pub midi_unpitched: Option<u8>,
pub staff_position: Option<i8>,
pub notehead: Option<NoteHead>,
pub preferred_voice: Option<u8>,
pub techniques: Vec<String>,
}Fields§
§id: StringStable MusicXML score-instrument identity.
name: Option<String>§midi_unpitched: Option<u8>General MIDI percussion key (0-based, 35 = acoustic bass drum, 38 = acoustic snare)
played for this instrument. MusicXML <midi-unpitched> is 1-based and is converted
on import and export.
staff_position: Option<i8>Diatonic staff position relative to the middle line.
notehead: Option<NoteHead>Default glyph when a note does not supply a renderer-specific override.
preferred_voice: Option<u8>Preferred one-based score voice for newly entered kit notes.
techniques: Vec<String>Named kit-specific variants such as rim-shot or open.
Implementations§
Source§impl PercussionInstrument
An editable percussion-kit mapping associated with a MusicXML score-instrument identity.
impl PercussionInstrument
An editable percussion-kit mapping associated with a MusicXML score-instrument identity.
The MIDI key remains the playback fallback, while the remaining fields describe renderer-independent notation defaults. Individual notes may still override these defaults.
Sourcepub fn display_position(pitch: &Pitch) -> i8
pub fn display_position(pitch: &Pitch) -> i8
Diatonic steps of a displayed unpitched note from the five-line staff’s middle line
(B4 in the treble/percussion layout), the unit of staff_position.