[−][src]Struct iced_audio::OctaveParam
A Param
that defines a continuous logarithmic range of f32
frequency
values, with each octave in the 10 octave spectrum spaced evenly.
Smaller frequencies will increment slower per slider movement than larger ones.
Methods
impl OctaveParam
[src]
pub fn new(id: u32, min: f32, max: f32, value: f32, default_value: f32) -> Self
[src]
Creates a new OctaveParam
Arguments
id
- an identifier for the parameter (must be unique!)min
- the minimum of the range in Hz (inclusive), will be constrained to20.0 Hz <= min <= 20480.0 Hz
max
- the maximum of the range in Hz (inclusive), will be constrained to20.0 Hz <= max <= 20480.0 Hz
value
- the initial value of the parameter in Hz (ifvalue
falls outside the range given bymin
andmax
, thenmin
ormax
will be used instead)default_value
- the default value of the parameter in Hz (ifdefault_value
falls outside the range given bymin
andmax
, thenmin
ormax
will be used instead)
Panics
This will panic if
max
<=min
pub fn set_from_value(&mut self, value: f32)
[src]
Sets the parameter's value to value
If value
falls outside the range given by min
and max
from
FloatParam::new()
, then
min
or max
will be used instead.
Value to Normal
calculactions will not be recalculated if the value
has not changed.
pub fn set_from_normal(&mut self, normal: Normal)
[src]
Sets the parameter's value from a Normal
Normal
to value calculactions will not be recalculated if the Normal
has not changed.
pub fn value(&self) -> f32
[src]
Returns the parameter's value
pub fn default_value(&self) -> f32
[src]
Returns the parameter's default value
Trait Implementations
impl Clone for OctaveParam
[src]
fn clone(&self) -> OctaveParam
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for OctaveParam
[src]
impl Debug for OctaveParam
[src]
impl Param for OctaveParam
[src]
impl PartialEq<OctaveParam> for OctaveParam
[src]
fn eq(&self, other: &OctaveParam) -> bool
[src]
fn ne(&self, other: &OctaveParam) -> bool
[src]
impl StructuralPartialEq for OctaveParam
[src]
Auto Trait Implementations
impl RefUnwindSafe for OctaveParam
impl Send for OctaveParam
impl Sync for OctaveParam
impl Unpin for OctaveParam
impl UnwindSafe for OctaveParam
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,