Skip to main content

VetConfig

Struct VetConfig 

Source
pub struct VetConfig {
    pub rms_floor: f64,
    pub peak_ceiling: f64,
    pub max_dc_ratio: f64,
}
Expand description

Vet thresholds. Defaults are deliberately lenient — the gate exists to catch pathology, not to encode taste (that’s the model’s job).

Re-checked against the v2 palette’s drive modules and left unchanged. A gate tuned before distortion existed is exactly the kind that starts quarantining a whole timbre as pathology, so the three thresholds were measured over the full cross of {soft, hard, tube} × drive {0.3, 0.6, 0.85, 1.0} × {saw, square, supersaw}, plus a stacked fold → tube drive → resonant ladder chain:

  • peak never exceeded 2.00 against a 3.5 ceiling. quiver’s shapers all normalize into the ±1 domain and rescale, so the module is bounded at ±5 V by construction however hard it is driven — drive buys harmonics, not level.
  • |mean|/rms never exceeded 0.0016 against a 0.6 limit, because compile::makes_dc puts a blocker in front of every tube-mode patch. Without it the same renders measure 1–8% — still nowhere near the threshold, which is the point: this gate was never the thing protecting the feature extractor from that offset.
  • rms stayed far above the floor; distortion raises level, it cannot silence a patch.

So no threshold moved. The one that would have needed to, had the module not been bounded, is peak_ceiling.

Fields§

§rms_floor: f64

RMS below this is “silent”.

§peak_ceiling: f64

Peak above this is runaway (limiter ceiling 0.8 + generous headroom).

§max_dc_ratio: f64

|mean|/rms above this is DC-dominated.

Implementations§

Source§

impl VetConfig

Source

pub fn for_spec(spec: &PhraseSpec) -> Self

Defaults with the peak ceiling scaled for the phrase’s polyphony.

The default ceiling (2.0) is one limiter-bounded voice (~1.5 peak in the ±1.0 float domain) plus overshoot headroom. N gate-synced voices legitimately sum toward N× one voice, and that summing is exactly the stacking information the chord segment exists to measure — so each additional simultaneous voice raises the ceiling by one voice’s worth (1.5) rather than the gate quarantining honest polyphony as runaway.

Trait Implementations§

Source§

impl Clone for VetConfig

Source§

fn clone(&self) -> VetConfig

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 VetConfig

Source§

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

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

impl Default for VetConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for VetConfig

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,