Program

Struct Program 

Source
pub struct Program {
Show 45 fields pub interpolation: bool, pub low_cut_enabled: bool, pub high_cut_enabled: bool, pub input_mix: f32, pub low_cut: f32, pub high_cut: f32, pub dry_out: f32, pub early_out: f32, pub late_out: f32, pub tap_enabled: bool, pub tap_count: f32, pub tap_decay: f32, pub tap_predelay: f32, pub tap_length: f32, pub early_diffuse_enabled: bool, pub early_diffuse_count: f32, pub early_diffuse_delay: f32, pub early_diffuse_mod_amount: f32, pub early_diffuse_feedback: f32, pub early_diffuse_mod_rate: f32, pub late_mode: LateMode, pub late_line_count: f32, pub late_diffuse_enabled: bool, pub late_diffuse_count: f32, pub late_line_size: f32, pub late_line_mod_amount: f32, pub late_diffuse_delay: f32, pub late_diffuse_mod_amount: f32, pub late_line_decay: f32, pub late_line_mod_rate: f32, pub late_diffuse_feedback: f32, pub late_diffuse_mod_rate: f32, pub eq_low_shelf_enabled: bool, pub eq_high_shelf_enabled: bool, pub eq_lowpass_enabled: bool, pub eq_low_freq: f32, pub eq_high_freq: f32, pub eq_cutoff: f32, pub eq_low_gain: f32, pub eq_high_gain: f32, pub eq_cross_seed: f32, pub seed_tap: f32, pub seed_diffusion: f32, pub seed_delay: f32, pub seed_post_diffusion: f32,
}
Expand description

Contains the state of all CloudSeedCore parameters. All parameters are normalized to the range 0..1.

Fields§

§interpolation: bool§low_cut_enabled: bool§high_cut_enabled: bool§input_mix: f32§low_cut: f32§high_cut: f32§dry_out: f32§early_out: f32§late_out: f32§tap_enabled: bool§tap_count: f32§tap_decay: f32§tap_predelay: f32§tap_length: f32§early_diffuse_enabled: bool§early_diffuse_count: f32§early_diffuse_delay: f32§early_diffuse_mod_amount: f32§early_diffuse_feedback: f32§early_diffuse_mod_rate: f32§late_mode: LateMode§late_line_count: f32§late_diffuse_enabled: bool§late_diffuse_count: f32§late_line_size: f32§late_line_mod_amount: f32§late_diffuse_delay: f32§late_diffuse_mod_amount: f32§late_line_decay: f32§late_line_mod_rate: f32§late_diffuse_feedback: f32§late_diffuse_mod_rate: f32§eq_low_shelf_enabled: bool§eq_high_shelf_enabled: bool§eq_lowpass_enabled: bool§eq_low_freq: f32§eq_high_freq: f32§eq_cutoff: f32§eq_low_gain: f32§eq_high_gain: f32§eq_cross_seed: f32§seed_tap: f32§seed_diffusion: f32§seed_delay: f32§seed_post_diffusion: f32

Implementations§

Source§

impl Program

Conversions between Program and array of normalized parameter values.

Source

pub fn to_array(&self) -> [f32; 45]

Converts this program to an array of normalized parameter values. You can use this to serialize plugin state.

Source

pub fn from_array(a: [f32; 45]) -> Self

Creates a Program from a full parameter array. This can be used for deserialization purposes.

Source

pub fn from_slice(slice: &[f32]) -> Option<Self>

Tries to create a Program from a slice of length 45. Returns None if the slice doesn’t have the expected length.

Source§

impl Program

Get and set parameters by id.

Source

pub fn get(&self, id: ParamId) -> f32

Returns the normalized value of the parameter with the given id.

Source

pub fn set(&mut self, id: ParamId, value: f32)

Set a parameter by id. Returns previous value on success.

Trait Implementations§

Source§

impl Clone for Program

Source§

fn clone(&self) -> Program

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 Program

Source§

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

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

impl PartialEq for Program

Source§

fn eq(&self, other: &Program) -> 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 Copy for Program

Source§

impl StructuralPartialEq for Program

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