Struct LfoBlock

Source
pub struct LfoBlock<S>
where S: Sample,
{ pub frequency: Parameter<S>, pub depth: Parameter<S>, /* private fields */ }
Expand description

A low-frequency oscillator for modulating block parameters.

Generates control signals (typically < 20 Hz) using standard waveforms. Output range is -depth to +depth, centered at zero.

Fields§

§frequency: Parameter<S>

LFO frequency in Hz (typically 0.01-20 Hz).

§depth: Parameter<S>

Modulation depth (output amplitude).

Implementations§

Source§

impl<S> LfoBlock<S>
where S: Sample,

Source

pub fn new( frequency: f64, depth: f64, waveform: Waveform, seed: Option<u64>, ) -> LfoBlock<S>

Create an LfoBlock with a given frequency, depth, waveform, and optional seed (used for noise waveforms).

Trait Implementations§

Source§

impl<S> Block<S> for LfoBlock<S>
where S: Sample,

Source§

fn process( &mut self, _inputs: &[&[S]], outputs: &mut [&mut [S]], modulation_values: &[S], context: &DspContext, )

Process audio through this block. Read more
Source§

fn input_count(&self) -> usize

Returns the number of input ports this block accepts.
Source§

fn output_count(&self) -> usize

Returns the number of output ports this block produces.
Source§

fn modulation_outputs(&self) -> &[ModulationOutput]

Returns the modulation outputs this block provides. Read more
Source§

fn channel_config(&self) -> ChannelConfig

Returns how this block handles multi-channel audio. Read more
Source§

fn set_smoothing(&mut self, _sample_rate: f64, _ramp_time_ms: f64)

Configure smoothing time for parameter changes. Read more
Source§

impl<S> From<LfoBlock<S>> for BlockType<S>
where S: Sample,

Source§

fn from(block: LfoBlock<S>) -> BlockType<S>

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<S> Freeze for LfoBlock<S>
where S: Freeze,

§

impl<S> RefUnwindSafe for LfoBlock<S>
where S: RefUnwindSafe,

§

impl<S> Send for LfoBlock<S>

§

impl<S> Sync for LfoBlock<S>

§

impl<S> Unpin for LfoBlock<S>
where S: Unpin,

§

impl<S> UnwindSafe for LfoBlock<S>
where S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.