pub struct InstrumentDefinition {Show 13 fields
pub id: String,
pub name: String,
pub short_name: String,
pub family: Option<String>,
pub transpose_semitones: i8,
pub written_range: Option<InstrumentRange>,
pub sounding_range: Option<InstrumentRange>,
pub default_clefs: Vec<Clef>,
pub staff_count: u8,
pub staff_kind: StaffKind,
pub midi_channel: u8,
pub midi_program: u8,
pub percussion_map_id: Option<String>,
}Expand description
Stable, renderer-independent instrument semantics for a part.
This is deliberately separate from a part’s current MIDI state: the latter records imported/performance values, while this definition supplies the instrument identity, notation defaults, and practical written/sounding ranges used by editors and layout clients.
Fields§
§id: StringStable source or application-defined identifier. It must be non-empty.
name: String§short_name: String§family: Option<String>§transpose_semitones: i8§written_range: Option<InstrumentRange>§sounding_range: Option<InstrumentRange>§default_clefs: Vec<Clef>§staff_count: u8§staff_kind: StaffKind§midi_channel: u8§midi_program: u8§percussion_map_id: Option<String>Implementations§
Trait Implementations§
Source§impl Clone for InstrumentDefinition
impl Clone for InstrumentDefinition
Source§impl Debug for InstrumentDefinition
impl Debug for InstrumentDefinition
Source§impl<'de> Deserialize<'de> for InstrumentDefinition
impl<'de> Deserialize<'de> for InstrumentDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InstrumentDefinition
impl PartialEq for InstrumentDefinition
Source§impl Serialize for InstrumentDefinition
impl Serialize for InstrumentDefinition
impl StructuralPartialEq for InstrumentDefinition
Auto Trait Implementations§
impl Freeze for InstrumentDefinition
impl RefUnwindSafe for InstrumentDefinition
impl Send for InstrumentDefinition
impl Sync for InstrumentDefinition
impl Unpin for InstrumentDefinition
impl UnsafeUnpin for InstrumentDefinition
impl UnwindSafe for InstrumentDefinition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more