Skip to main content

ParamMap

Enum ParamMap 

Source
pub enum ParamMap {
Show 30 variants Unit, Resonance, Feedback, FeedbackBipolar, XfadePos, FoldThreshold, GainBipolar, FormantShift, ClockRate, EuclidSteps, EuclidPulses, SlewTime, Semitones, DuckAmount, DetectorThreshold, DuckThreshold, ModDepthBipolar, ModDepthUnipolar, ModDepthPitch, ModDepthPitchUnipolar, ModDepthGain, ModDepthGainUnipolar, ModDepthShift, ModDepthShiftUnipolar, ModDepthParamCv, ModDepthParamCvUnipolar, ModDepthDetector, ModDepthDetectorUnipolar, TableIndex, OctaveTrim(i8),
}
Expand description

How a normalized knob value maps to the volts written to its handle.

Variants§

§

Unit

Pass through (0..1 knob CV).

§

Resonance

Bounded resonance (0.85·x).

§

Feedback

Bounded delay feedback (0.7·x).

§

FeedbackBipolar

Bounded feedback on a bipolar port ((2x−1)·0.7), where the sign of the feedback is itself a timbre.

§

XfadePos

Crossfader position ((2x−1)·5 V).

§

FoldThreshold

Wavefolder threshold (0.1 + 0.9·x).

§

GainBipolar

Shelf/bell gain on a ±5 V port ((2x−1)·5), where knob centre must be 0 dB.

§

FormantShift

Formant shift on a ±5 V port ((2x−1)·5), where knob centre is no shift.

§

ClockRate

A [quiver::modules::Clock] tempo (10·x), i.e. the port’s whole 0–10 V range.

§

EuclidSteps

Euclidean step count (0.14 + 0.86·x), i.e. 4..16 rather than 2..16.

§

EuclidPulses

Euclidean pulse density (0.25 + 0.74·x), bounded off both degenerate ends at every step count.

§

SlewTime

A [quiver::modules::SlewLimiter] time (0.4·x), i.e. the bottom of a port whose own map is already square-law.

§

Semitones

Transposition on the pitch shifter’s ±5 V shift port ((2x−1)·2.5), i.e. ∓12 semitones with unison at knob centre.

§

DuckAmount

The ducker’s amount, a bipolar CV summed onto a knob base of 1.0 ((x−1)·5).

§

DetectorThreshold

A dynamics detector threshold, geometric over 0.05–5 V, on a port quiver reads as cv · 5 volts.

§

DuckThreshold

The same threshold on the ducker’s ModulatedParam port, which reads as (0.2 + cv/5)·5 volts.

§

ModDepthBipolar

Mod depth for a ±5 V source into a normalized 0..1 port.

§

ModDepthUnipolar

Mod depth for a 0–10 V source into a normalized 0..1 port.

§

ModDepthPitch

Mod depth for a ±5 V source into the pitch [Offset] (V/Oct).

§

ModDepthPitchUnipolar

Mod depth for a 0–10 V source into the pitch [Offset] (V/Oct).

§

ModDepthGain

Mod depth for a ±5 V source into a ±5 V gain port (the EQ bands).

§

ModDepthGainUnipolar

Mod depth for a 0–10 V source into a ±5 V gain port.

§

ModDepthShift

Mod depth for a ±5 V source into the pitch shifter’s semitone port.

§

ModDepthShiftUnipolar

Mod depth for a 0–10 V source into the semitone port.

§

ModDepthParamCv

Mod depth for a ±5 V source into a [quiver::prelude::ModulatedParam] knob+CV port, where ±5 V spans the whole normalized parameter.

§

ModDepthParamCvUnipolar

Mod depth for a 0–10 V source into a ModulatedParam knob+CV port.

§

ModDepthDetector

Mod depth for a ±5 V source into a dynamics threshold port.

§

ModDepthDetectorUnipolar

Mod depth for a 0–10 V source into a dynamics threshold port.

§

TableIndex

Categorical. Wavetable select, as a table index rather than a 0..1 knob: i ↦ i/7, the same [map::table_cv] the port used to be pinned to. See Self::clamp_input for why the domain is not 0..1.

§

OctaveTrim(i8)

Categorical. Octave select, as an index 0..=4 (i ↦ i−2 octaves), minus the octave already baked into this voice’s pitch [Offset] — which is the i8 payload.

The relative form is the whole trick, and it is what keeps this change from moving a single sample of an existing patch. quiver sums every cable into a patched input and writes the default into an unpatched one, so a cable carrying the absolute offset would have to be added in a different place in the sum than the [Offset]’s own constant is: (pitch + oct) + detune instead of pitch + (oct + detune), which disagree in the last bit, and again with a pitch-mod cable in the sum. A trim is +0.0 at compile time, and x + 0.0 is exactly x.

It also means the panel and the compiler can never double-count: a recompile re-bakes whatever octave the tree now holds and re-zeroes the trim in the same breath.

Implementations§

Source§

impl ParamMap

Source

pub fn clamp_input(self, x: f64) -> f64

Clamp a value arriving from the panel to this map’s input domain.

Continuous knobs are 0..1 and always were. The two categorical sites that became live send a category index, so the blanket value.clamp(0.0, 1.0) the live path used to apply would have folded all eight wavetables onto the first two.

Source

pub fn apply(self, x: f64) -> f64

Map a normalized value to the wire value.

Trait Implementations§

Source§

impl Clone for ParamMap

Source§

fn clone(&self) -> ParamMap

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 ParamMap

Source§

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

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

impl Copy for ParamMap

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,