Skip to main content

Transform

Enum Transform 

Source
pub enum Transform {
Show 17 variants Rev, Fast(Ramp<f64>), Slow(Ramp<f64>), Every(u32, Box<Transform>), Arp(ArpMode), Scale(PitchRoot, ScaleMode), Oct(Ramp<i32>), Vel(Ramp<f64>), RampSpan { cycles: u32, curve: RampCurve, }, Gain(Ramp<f64>), Pan(Ramp<f64>), AutoPan(PanSweep), Lpf(Ramp<f64>), Hpf(Ramp<f64>), Fx(FxCall), Delay(Ramp<f64>, Ramp<f64>, Option<Ramp<f64>>), Reverb(Ramp<f64>),
}
Expand description

A transform applied after the mini-notation via |.

Transforms split into two families, which matters to consumers: Rev, Fast, Slow, Arp, Scale, Oct and Vel reshape the scheduled events, while Gain, Pan, Lpf, Hpf, Delay and Reverb describe an ordered DSP chain.

Every numeric argument is a Ramp, so any of them may travel across the line’s Transform::RampSpan (§4.6). A parameter that only ever holds one value is a Ramp::Fixed, and Ramp::travels is how a consumer tells the two apart.

Variants§

§

Rev

§

Fast(Ramp<f64>)

§

Slow(Ramp<f64>)

§

Every(u32, Box<Transform>)

§

Arp(ArpMode)

§

Scale(PitchRoot, ScaleMode)

§

Oct(Ramp<i32>)

§

Vel(Ramp<f64>)

vel <0.0..=1.0> — the line’s default note velocity. A step that names its own velocity (X, :v — see crate::ast::mini::Step) overrides this for that step.

§

RampSpan

ramp <cycles> [lin|exp] — how long the line’s ranges take to travel, and how they get there. One span governs every range on the line.

Fields

§cycles: u32
§

Gain(Ramp<f64>)

gain <0.0..=2.0> — output level, positional in the DSP chain.

§

Pan(Ramp<f64>)

pan <-1.0..=1.0> — a fixed stereo position, positional in the chain.

§

AutoPan(PanSweep)

pan <wave> <rate>[hz] [depth] — a stereo position swept by an LFO.

§

Lpf(Ramp<f64>)

§

Hpf(Ramp<f64>)

§

Fx(FxCall)

fx <filter> <arg>..., or one of its short aliases.

The filter is named but not resolved here: this crate has no knowledge of the engine’s filter set, so the consumer looks the name up in its own registry and reports an unknown one.

§

Delay(Ramp<f64>, Ramp<f64>, Option<Ramp<f64>>)

delay <time> <feedback> [mix] — the wet mix defaults to 0.35.

§

Reverb(Ramp<f64>)

Trait Implementations§

Source§

impl Clone for Transform

Source§

fn clone(&self) -> Self

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 Transform

Source§

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

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

impl PartialEq for Transform

Source§

fn eq(&self, other: &Self) -> 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 Transform

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 = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

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.