pub struct Staff {
pub clef: Clef,
pub measures: Vec<Measure>,
pub transpose_semitones: i8,
pub tablature: Option<TablatureConfig>,
pub presentation: StaffPresentation,
}Fields§
§clef: Clef§measures: Vec<Measure>§transpose_semitones: i8Semitones to add to written pitch for concert pitch / MIDI output. -2 = Bb instrument (clarinet, trumpet), -9 = Eb instrument (alto sax), etc.
tablature: Option<TablatureConfig>§presentation: StaffPresentationImplementations§
Source§impl Staff
impl Staff
pub fn new(clef: Clef) -> Self
Sourcepub fn tablature_at(&self, measure_index: usize) -> Option<TablatureConfig>
pub fn tablature_at(&self, measure_index: usize) -> Option<TablatureConfig>
Resolve the tablature tuning and capo active at a physical measure.
A measure-local change starts at its own boundary and continues until replaced or cleared. Line-count changes are rejected by validation so the staff geometry remains stable within a system.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Staff
impl<'de> Deserialize<'de> for Staff
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
Auto Trait Implementations§
impl Freeze for Staff
impl RefUnwindSafe for Staff
impl Send for Staff
impl Sync for Staff
impl Unpin for Staff
impl UnsafeUnpin for Staff
impl UnwindSafe for Staff
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