Skip to main content

ChorusEffect

Struct ChorusEffect 

Source
pub struct ChorusEffect { /* private fields */ }
Expand description

Stereo chorus effect with an filtered, interpolated delay-line.

Implementations§

Source§

impl ChorusEffect

Source

pub const EFFECT_NAME: &str = "Chorus"

Source

pub const RATE: FloatParameter

Source

pub const PHASE: FloatParameter

Source

pub const DEPTH: FloatParameter

Source

pub const FEEDBACK: FloatParameter

Source

pub const DELAY: FloatParameter

Source

pub const WET_MIX: FloatParameter

Source

pub const FILTER_TYPE: EnumParameter

Source

pub const FILTER_FREQ: FloatParameter

Source

pub const FILTER_RESONANCE: FloatParameter

Source

pub fn new() -> Self

Creates a new ChorusEffect with default parameter values.

Source

pub fn with_parameters( rate: f32, phase: f32, depth: f32, feedback: f32, delay: f32, wet_mix: f32, filter_type: ChorusEffectFilterType, filter_freq: f32, filter_resonance: f32, ) -> Self

Creates a new ChorusEffect with the given parameters.

Trait Implementations§

Source§

impl Default for ChorusEffect

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Effect for ChorusEffect

Source§

fn name(&self) -> &'static str

A unique, static name for the effect. Read more
Source§

fn weight(&self) -> usize

Return a rough estimate of the processing costs for this effect in range ~1..10, where 1 means pretty lightweight and 10 very CPU intensive. This is used in parallel processing to distribute work loads evenly before or without actual CPU measurements.
Source§

fn parameters(&self) -> Vec<&dyn Parameter>

Returns a list of parameter descriptors for this effect. Read more
Source§

fn initialize( &mut self, sample_rate: u32, channel_count: usize, _max_frames: usize, ) -> Result<(), Error>

Initializes the effect with the audio output’s properties. Read more
Source§

fn process(&mut self, output: &mut [f32], _time: &EffectTime)

Processes an audio buffer in-place, applying the effect. Read more
Source§

fn process_tail(&self) -> Option<usize>

Returns the number of audible sample frames this effect will produce, after it received silence. Read more
Source§

fn process_message( &mut self, message: &EffectMessagePayload, ) -> Result<(), Error>

Handles optional effect-specific messages in the real-time thread. This can be used to pass payloads to the effects, which can or should not be expressed as a trivial parameter change. Read more
Source§

fn process_parameter_update( &mut self, id: FourCC, value: &ParameterValueUpdate, ) -> Result<(), Error>

Handles a parameter update in the real-time thread. Read more
Source§

fn into_box(self) -> Box<dyn Effect>
where Self: Sized,

Convert the Effect impl into a boxed dyn Effect. Read more
Source§

fn process_started(&mut self)

Called in the real-time thread before audio processing starts. Read more
Source§

fn process_stopped(&mut self)

Called in the real-time thread after processing stopped. Read more
Source§

fn process_parameter_updates( &mut self, values: &[(FourCC, ParameterValueUpdate)], ) -> Result<(), Error>

Handles multiple parameter updates in a batch in the real-time thread. Read more

Auto Trait Implementations§

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<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V