pub struct Voice {
pub channel: u8,
pub key: u8,
pub started_at: Duration,
pub release_at: Option<Duration>,
pub release_end: Option<Duration>,
pub frequency: Frequency,
pub amplitude_gain: f64,
pub pan: f32,
pub phase: VoicePhase,
pub timbre: Timbre,
}Expand description
An allocated voice sounding a single note.
Fields§
§channel: u8MIDI channel that triggered the voice.
key: u8MIDI note key.
started_at: DurationTime the voice started.
release_at: Option<Duration>Time the voice entered its release stage, if any.
release_end: Option<Duration>Time the release stage completes, if known.
frequency: FrequencySounding frequency, including any pitch bend or tuning offset.
amplitude_gain: f64Amplitude gain applied to the voice.
pan: f32Stereo pan in -1.0..=1.0.
phase: VoicePhaseCurrent lifecycle phase.
timbre: TimbreTimbre used to render the voice.
Trait Implementations§
impl StructuralPartialEq for Voice
Auto Trait Implementations§
impl Freeze for Voice
impl RefUnwindSafe for Voice
impl Send for Voice
impl Sync for Voice
impl Unpin for Voice
impl UnsafeUnpin for Voice
impl UnwindSafe for Voice
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