pub enum Waveform {
Sine {
frequency: f32,
amplitude: f32,
phase: f32,
},
Sawtooth {
frequency: f32,
amplitude: f32,
},
Square {
frequency: f32,
amplitude: f32,
duty_cycle: f32,
},
Triangle {
frequency: f32,
amplitude: f32,
},
Noise {
seed: u32,
smoothness: f32,
},
}Expand description
A procedural scalar waveform.
Variants§
Sine
Continuous sine wave.
Fields
Sawtooth
Linear ramp from -amplitude to amplitude, then wraps.
Square
Two-state square wave.
Fields
Triangle
Triangle wave with linear rise and fall.
Noise
Deterministic smoothed noise in [-1, 1].
Implementations§
Trait Implementations§
impl Copy for Waveform
impl StructuralPartialEq for Waveform
Auto Trait Implementations§
impl Freeze for Waveform
impl RefUnwindSafe for Waveform
impl Send for Waveform
impl Sync for Waveform
impl Unpin for Waveform
impl UnsafeUnpin for Waveform
impl UnwindSafe for Waveform
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