EQ

Struct EQ 

Source
pub struct EQ {
    pub bands: Vec<(EqBand, Active)>,
    pub min_gain: Gain,
    pub max_gain: Gain,
    pub min_frequency: Frequency,
    pub max_frequency: Frequency,
    pub min_q: Q,
    pub max_q: Q,
    pub active: Active,
}

Fields§

§bands: Vec<(EqBand, Active)>§min_gain: Gain§max_gain: Gain§min_frequency: Frequency§max_frequency: Frequency§min_q: Q§max_q: Q§active: Active

Implementations§

Source§

impl EQ

Source

pub fn new( bands: Vec<(EqBand, Active)>, min_gain: f64, max_gain: f64, min_frequency: f64, max_frequency: f64, min_q: f64, max_q: f64, active: Active, ) -> EQ

Source

pub fn plot(&self, width: f64, height: f64, invert_y: bool) -> EqGraph

Source

pub fn calc_major_frequency_grid_markers(&self, width: f64) -> Vec<X>

Source

pub fn calc_minor_frequency_grid_markers(&self, width: f64) -> Vec<X>

Source

pub fn update(&mut self, index: usize, change: Parameter)

Source

pub fn x_to_frequency_converter( &self, width: f64, ) -> (LinearScale<f64>, LogarithmicScale<f64>)

Source

pub fn y_to_gain_converter( &self, height: f64, inverted: bool, ) -> (LinearScale<f64>, LinearScale<f64>)

Source

pub fn q_to_radius_converter( &self, width: f64, ) -> (LogarithmicScale<f64>, LogarithmicScale<f64>)

Trait Implementations§

Source§

impl Clone for EQ

Source§

fn clone(&self) -> EQ

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for EQ

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for EQ

Source§

fn default() -> Self

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

impl PartialEq for EQ

Source§

fn eq(&self, other: &EQ) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for EQ

Auto Trait Implementations§

§

impl Freeze for EQ

§

impl RefUnwindSafe for EQ

§

impl Send for EQ

§

impl Sync for EQ

§

impl Unpin for EQ

§

impl UnwindSafe for EQ

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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<F, I> ToFloat<F> for I
where F: FromInt<I>,

Source§

fn to_float(self) -> F

Convert self into a floating point number.
Source§

impl<F, I> ToInt<I> for F
where I: FromFloat<F>,

Source§

fn to_int(self) -> I

Convert self into an integral number.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.