pub struct SamplerVoice {Show 13 fields
pub note: u8,
pub channel: u8,
pub velocity: f32,
pub position: f64,
pub pitch_ratio: f64,
pub volume: f32,
pub phase: VoicePhase,
pub envelope: EnvelopeState,
pub zone_id: String,
pub articulation: ArticulationType,
pub loop_start: usize,
pub loop_end: usize,
pub key_held: bool,
}Expand description
One active voice in the sampler.
Fields§
§note: u8MIDI note number.
channel: u8MIDI channel.
velocity: f32Velocity (0.0–1.0).
position: f64Current playback position in frames (sub-sample precision).
pitch_ratio: f64Playback speed ratio (accounts for pitch shifting).
volume: f32Volume multiplier from zone + velocity.
phase: VoicePhaseCurrent lifecycle phase.
envelope: EnvelopeStateADSR envelope.
zone_id: StringZone id this voice is playing.
articulation: ArticulationTypeArticulation type (cached from zone).
loop_start: usizeLoop start frame (if sustain loop).
loop_end: usizeLoop end frame (if sustain loop).
key_held: boolWhether the key is still held.
Implementations§
Auto Trait Implementations§
impl Freeze for SamplerVoice
impl RefUnwindSafe for SamplerVoice
impl Send for SamplerVoice
impl Sync for SamplerVoice
impl Unpin for SamplerVoice
impl UnsafeUnpin for SamplerVoice
impl UnwindSafe for SamplerVoice
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more