Skip to main content

GlobalParameterControl

Struct GlobalParameterControl 

Source
pub struct GlobalParameterControl {
    pub slot_paths: Vec<SlotPath>,
    pub param_id_width: u8,
    pub value_width: u8,
    pub params: Vec<GlobalParameter>,
}
Expand description

Global Parameter Control, to control parameters on a device that affect all sound. E.g. a global reverb. Used by UniversalRealTimeMsg::GlobalParameterControl.

As defined in CA-024.

This C/A is much more permissive than most, and thus has a pretty awkward interface.

Fields§

§slot_paths: Vec<SlotPath>

Between 0 and 127 SlotPaths, with each successive path representing a child of the preceding value. No paths refers to the “top level” (except if the first value refers to the top level ¯_(ツ)_/¯)

§param_id_width: u8

The number of bytes present in the ids of params, must be greater than 0 Must line up with the values provided in params or output will be massaged

§value_width: u8

The number of bytes present in the values of params, must be greater than 0 Must line up with the values provided in params` or output will be massaged

§params: Vec<GlobalParameter>

Any number of GlobalParameters

Implementations§

Source§

impl GlobalParameterControl

Source

pub fn reverb(reverb_type: Option<ReverbType>, reverb_time: Option<f32>) -> Self

Constructor for a GlobalParameterControl directed at a GM2 Reverb slot type.

reverb_time is the time in seconds (0.36 - 9.0) for which the low frequency portion of the original sound declines by 60dB

Source

pub fn chorus( chorus_type: Option<ChorusType>, mod_rate: Option<f32>, mod_depth: Option<f32>, feedback: Option<f32>, send_to_reverb: Option<f32>, ) -> Self

Constructor for a GlobalParameterControl directed at a GM2 Chorus slot type.

mod_rate is the modulation frequency in Hz (0.0-15.5).

mod_depth is the peak-to-peak swing of the modulation in ms (0.3-40.0).

feedback is the amount of feedback from Chorus output in percent (0.0-97.0).

send_to_reverb is the send level from Chorus to Reverb in percent (0.0-100.0).

Trait Implementations§

Source§

impl Clone for GlobalParameterControl

Source§

fn clone(&self) -> GlobalParameterControl

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalParameterControl

Source§

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

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

impl Eq for GlobalParameterControl

Source§

impl PartialEq for GlobalParameterControl

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for GlobalParameterControl

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.