pub struct PerformanceSourceState {
pub held_notes: BTreeMap<PerformanceNoteKey, HeldPerformanceNote>,
pub sustain_pedal: bool,
pub sostenuto_pedal: bool,
pub octave_shift: i8,
pub transpose: i8,
pub scale_lock: Option<ScaleLock>,
pub channel: Channel,
}Expand description
Mutable performance state tracked by a source.
Holds the currently sounding notes plus the transforms applied to incoming gestures: sustain pedal, octave shift, transpose, and optional scale lock.
Fields§
§held_notes: BTreeMap<PerformanceNoteKey, HeldPerformanceNote>Notes currently held, keyed by channel and pitch.
sustain_pedal: boolWhether the sustain pedal is down.
sostenuto_pedal: boolWhether the sostenuto pedal is down.
octave_shift: i8Octave shift applied to incoming pitches.
transpose: i8Semitone transpose applied to incoming pitches.
scale_lock: Option<ScaleLock>Optional scale lock snapping incoming pitches.
channel: ChannelDefault channel for the source.
Implementations§
Trait Implementations§
Source§impl Clone for PerformanceSourceState
impl Clone for PerformanceSourceState
Source§fn clone(&self) -> PerformanceSourceState
fn clone(&self) -> PerformanceSourceState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PerformanceSourceState
impl Debug for PerformanceSourceState
impl Eq for PerformanceSourceState
Source§impl PartialEq for PerformanceSourceState
impl PartialEq for PerformanceSourceState
impl StructuralPartialEq for PerformanceSourceState
Auto Trait Implementations§
impl Freeze for PerformanceSourceState
impl RefUnwindSafe for PerformanceSourceState
impl Send for PerformanceSourceState
impl Sync for PerformanceSourceState
impl Unpin for PerformanceSourceState
impl UnsafeUnpin for PerformanceSourceState
impl UnwindSafe for PerformanceSourceState
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