pub struct Voice {
pub wave: Wave,
pub freqs: &'static [f32],
pub honk_secs: f32,
pub gap_secs: f32,
pub attack_secs: f32,
pub release_secs: f32,
pub sweep: [(f32, f32); 3],
pub vibrato_hz: f32,
pub vibrato_depth: f32,
pub noise: f32,
pub cutoff_hz: f32,
}Expand description
Synthesis parameters for one style.
Fields§
§wave: Wave§freqs: &'static [f32]Base frequencies in Hz, sounded together (two tones = dual-tone horn).
honk_secs: f32§gap_secs: f32§attack_secs: f32§release_secs: f32§sweep: [(f32, f32); 3]Pitch multiplier over one honk: (position 0..=1, multiplier), three points.
vibrato_hz: f32§vibrato_depth: f32§noise: f32Noise mix 0..=1, the rasp of a rubber bulb.
cutoff_hz: f32One-pole low-pass cutoff in Hz.
Implementations§
Trait Implementations§
impl Copy for Voice
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