#[non_exhaustive]pub struct FilterBuilder {
pub mode: FilterMode,
pub cutoff: Value<f64>,
pub resonance: Value<f64>,
pub mix: Value<f64>,
}Expand description
Configures a filter effect.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.mode: FilterModeThe frequencies that the filter will remove.
cutoff: Value<f64>The cutoff frequency of the filter (in hertz).
resonance: Value<f64>The resonance of the filter.
The resonance is a feedback effect that produces a distinctive “ringing” sound.
mix: Value<f64>How much dry (unprocessed) signal should be blended
with the wet (processed) signal. 0.0 means
only the dry signal will be heard. 1.0 means
only the wet signal will be heard.
Implementations§
Source§impl FilterBuilder
impl FilterBuilder
Sourcepub fn new() -> FilterBuilder
pub fn new() -> FilterBuilder
Creates a new FilterBuilder with the default settings.
Sourcepub fn mode(self, mode: FilterMode) -> FilterBuilder
pub fn mode(self, mode: FilterMode) -> FilterBuilder
Sets the frequencies that the filter will remove.
Sourcepub fn cutoff(self, cutoff: impl Into<Value<f64>>) -> FilterBuilder
pub fn cutoff(self, cutoff: impl Into<Value<f64>>) -> FilterBuilder
Sets the cutoff frequency of the filter (in hertz).
Trait Implementations§
Source§impl Clone for FilterBuilder
impl Clone for FilterBuilder
Source§fn clone(&self) -> FilterBuilder
fn clone(&self) -> FilterBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FilterBuilder
impl Debug for FilterBuilder
Source§impl Default for FilterBuilder
impl Default for FilterBuilder
Source§fn default() -> FilterBuilder
fn default() -> FilterBuilder
Returns the “default value” for a type. Read more
Source§impl EffectBuilder for FilterBuilder
impl EffectBuilder for FilterBuilder
Source§type Handle = FilterHandle
type Handle = FilterHandle
Allows the user to control the effect from gameplay code.
Source§fn build(self) -> (Box<dyn Effect>, <FilterBuilder as EffectBuilder>::Handle)
fn build(self) -> (Box<dyn Effect>, <FilterBuilder as EffectBuilder>::Handle)
Creates the effect and a handle to the effect.
Source§impl PartialEq for FilterBuilder
impl PartialEq for FilterBuilder
impl Copy for FilterBuilder
impl StructuralPartialEq for FilterBuilder
Auto Trait Implementations§
impl Freeze for FilterBuilder
impl RefUnwindSafe for FilterBuilder
impl Send for FilterBuilder
impl Sync for FilterBuilder
impl Unpin for FilterBuilder
impl UnwindSafe for FilterBuilder
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().