Skip to main content

StructFeatures

Struct StructFeatures 

Source
pub struct StructFeatures {
Show 53 fields pub n_vco: f64, pub n_supersaw: f64, pub n_noise: f64, pub n_wavetable: f64, pub n_pluck: f64, pub n_formant: f64, pub n_silence: f64, pub n_mix: f64, pub n_ringmod: f64, pub n_filter: f64, pub n_eq: f64, pub n_fold: f64, pub n_distortion: f64, pub n_bitcrush: f64, pub n_delay: f64, pub n_granular: f64, pub n_shift: f64, pub n_comp: f64, pub n_duck: f64, pub n_gate: f64, pub n_vocoder: f64, pub n_chorus: f64, pub n_phaser: f64, pub n_flanger: f64, pub n_tremolo: f64, pub n_vibrato: f64, pub n_reverb: f64, pub n_lfo: f64, pub n_env: f64, pub n_rand: f64, pub n_follow: f64, pub n_euclid: f64, pub n_quantize: f64, pub n_slew: f64, pub n_rectify: f64, pub n_hold: f64, pub n_min: f64, pub n_max: f64, pub n_and: f64, pub n_or: f64, pub n_xor: f64, pub n_switch: f64, pub mod_depth_mean: f64, pub depth: f64, pub size: f64, pub mod_density: f64, pub branch_width_max: f64, pub chain_balance: f64, pub frac_sidechained: f64, pub mod_at_source: f64, pub amp_attack: f64, pub amp_sustain: f64, pub amp_release: f64,
}
Expand description

Named structural descriptors. to_vec order matches StructFeatures::NAMES.

The n_* fields are raw per-kind counts for display; several of them are summed into families before they reach φ (see the module doc).

Fields§

§n_vco: f64

Number of Vco sources.

§n_supersaw: f64

Number of Supersaw sources.

§n_noise: f64

Number of noise sources.

§n_wavetable: f64

Number of wavetable oscillators.

§n_pluck: f64

Number of plucked strings.

§n_formant: f64

Number of formant oscillators.

§n_silence: f64

Number of Silence leaves — sockets the player left unplugged.

A φ coordinate, and it joins the source/binary identity in the module doc as its own column rather than sitting outside it. Outside, the identity would hold exactly whenever a tree has no holes and be slack when it does — near-exact almost always, which is the harder case to reason about, not the easier one. Inside, it stays one equation with one dropped column and n_mix remains the one dropped.

Its prior rate is ~0.5%, which for any other kind would be the near-indicator-variable objection that kept n_ringmod out. It does not apply here, because a hole’s prevalence is set by the player’s edits and not by the prior — the one kind in the grammar of which that is true.

§n_mix: f64

Number of Mix nodes. Not a φ coordinate — see the module doc’s exact identity. Kept for display.

§n_ringmod: f64

Number of ring modulators. Not a φ coordinate on its own — it is counted inside the n_drive family, which is both what keeps it out of the binary-node identity and what stops a 3.5%-prevalence column reaching the model as a near-indicator variable.

§n_filter: f64

Number of filters.

§n_eq: f64

Number of EQs. Folded into the n_filter family in φ — both answer “how much is the spectrum being tilted”.

§n_fold: f64

Number of wavefolders. Folded into the n_drive family in φ.

§n_distortion: f64

Number of distortions. Folded into the n_drive family in φ.

§n_bitcrush: f64

Number of bitcrushers. Folded into the n_drive family in φ.

§n_delay: f64

Number of delays. Folded into the n_time family in φ.

§n_granular: f64

Number of granulators. Folded into the n_time family in φ.

§n_shift: f64

Number of pitch shifters. Folded into the n_time family in φ.

§n_comp: f64

Number of compressors. Folded into the n_dynamics family in φ.

§n_duck: f64

Number of duckers. Folded into the n_dynamics family in φ.

§n_gate: f64

Number of gates. Folded into the n_dynamics family in φ.

§n_vocoder: f64

Number of vocoders. Folded into the n_filter family in φ — a vocoder is a filter bank whose curve is drawn by a second signal.

§n_chorus: f64

Number of choruses. Folded into the n_mod_fx family in φ.

§n_phaser: f64

Number of phasers. Folded into the n_mod_fx family in φ.

§n_flanger: f64

Number of flangers. Folded into the n_mod_fx family in φ.

§n_tremolo: f64

Number of tremolos. Folded into the n_mod_fx family in φ.

§n_vibrato: f64

Number of vibratos. Folded into the n_mod_fx family in φ.

§n_reverb: f64

Number of reverbs.

§n_lfo: f64

Number of LFO modulators.

§n_env: f64

Number of envelope modulators.

§n_rand: f64

Number of S&H random modulators.

§n_follow: f64

Number of envelope followers.

§n_euclid: f64

Number of euclidean gate patterns. Folded into the n_mod_logic family in φ.

§n_quantize: f64

Number of scale quantizers in modulation chains. n_mod_shape family.

§n_slew: f64

Number of slew limiters in modulation chains. n_mod_shape family.

§n_rectify: f64

Number of rectifiers in modulation chains. n_mod_shape family.

§n_hold: f64

Number of clocked sample-and-holds in modulation chains. n_mod_shape family.

§n_min: f64

Number of CV minimum combiners. n_mod_logic family.

§n_max: f64

Number of CV maximum combiners. n_mod_logic family.

§n_and: f64

Number of gate ANDs. n_mod_logic family.

§n_or: f64

Number of gate ORs. n_mod_logic family.

§n_xor: f64

Number of gate XORs. n_mod_logic family.

§n_switch: f64

Number of CV switches. n_mod_logic family.

§mod_depth_mean: f64

Mean nesting depth of the filled modulation slots (1 for a bare modulator, 2 for one wrapped in a processor, …); 0 when nothing is modulated.

§depth: f64

Tree depth. Not a φ coordinate — VIF ≈ 21.7 against the module counts; see the module doc. Kept for display.

§size: f64

Tree size (audio nodes). Not a φ coordinate — it is exactly the sum of the raw n_* module counts above; see the module doc. Kept for display.

§mod_density: f64

Fraction of modulation slots actually filled.

§branch_width_max: f64

Largest number of audio nodes sharing one level of the tree. 1 for any serial chain. Not a φ coordinate — a VIF sweep caught it at 10.4, dragging every source count with it, because on trees this size it is very nearly the leaf count and the leaf count is 1 + Σ binaries exactly. See the module doc’s wave-3 section. Kept for display.

§chain_balance: f64

Mean source-to-root path length divided by the longest one. 1.0 when every source sits the same distance from the amp.

§frac_sidechained: f64

Of the binary nodes, the fraction whose /1 child is not a bare source. 0 when the tree has no binary node.

§mod_at_source: f64

Mean over the filled modulation slots of the owning module’s distance from the root, over the tree’s depth. 0 = modulation at the output stage, 1 = modulation at the sources. Not a φ coordinate — it is well conditioned (VIF 3.0) and answers a real question, and the evolution measurement could not show that it paid for its dimension; see the module doc’s wave-3 section. Kept for display, and the obvious candidate for the next wave that has evidence to spend.

§amp_attack: f64

Amp attack (normalized).

§amp_sustain: f64

Amp sustain (normalized).

§amp_release: f64

Amp release (normalized).

Implementations§

Source§

impl StructFeatures

Source

pub const NAMES: [&'static str; 26]

Feature names in to_vec order.

Append-only. The audio names come first in Features::phi_names, so the end of this array is the end of φ — and a legacy observation logged without names is re-read positionally by FitSet::build. Appending leaves every one of those positions meaning what it meant; inserting in the middle would silently re-label every vote ever cast.

Source

pub const UNIT_NAMES: [&'static str; 7]

The φ_struct coordinates that are bounded to [0, 1] — three normalized genome sites read straight off the term, and four ratios of two counts.

A subset of Self::NAMES and not a reordering of it: the counts have no upper bound, so a range check over the whole vector could only be a finiteness check. Named here so the debug assertion below, the featurizer’s quarantine and the saved-log repair all read one list instead of three that drift.

Source

pub fn unit_coordinates(&self) -> [f64; 7]

This term’s values for Self::UNIT_NAMES, in that order.

Source

pub fn n_drive(&self) -> f64

Nonlinear colour: wavefolder + distortion + bitcrusher + ring mod.

Source

pub fn n_filter_family(&self) -> f64

Spectral tilt: filter + EQ + vocoder. A tone control and a resonant filter are the same question asked at different sharpnesses — “how much is this patch’s balance being reshaped” — and a vocoder is that question again with the curve drawn by a signal instead of by a knob. Each of the three arrives at well under 3% prevalence, which is exactly the near-indicator column the family scheme exists to keep out of φ.

Source

pub fn n_time(&self) -> f64

Smearing in time: delay + granular + pitch shift. Named n_time rather than n_delay because the column counts three ways of doing it, and a name that says “delay” while counting granulators is the kind of quiet dishonesty the Styles tab would render as if it meant something. The pitch shifter belongs here on mechanism and on sound: it is a rolling buffer read at the wrong rate, and what it produces is the smeared, grainy artefact family the other two produce.

Source

pub fn n_dynamics(&self) -> f64

Level shaped by a second signal: compressor + ducker + gate.

One column for the three, on the usual family argument — a user who likes a pumping patch does not first decide whether the pump comes from a ratio, a duck depth or a gate range. It is also the only safe way to carry them: see the module doc’s generalized identity, which these three are on the wrong side of.

Source

pub fn n_mod_fx(&self) -> f64

Periodic movement: chorus + phaser + flanger + tremolo + vibrato. Each is an LFO applied to something — a short delay, an allpass chain, a gain — against or instead of the dry signal. The delay line, the granulator and the reverb are not here because they place a sound in a space rather than move it.

Source

pub fn n_mod_shape(&self) -> f64

CV that has been shaped before it lands: quantizer + slew + rectifier + clocked hold.

Two columns for eleven modules, not eleven, on exactly the argument that produced n_drive and n_mod_fx — and here the prevalence case is stronger still, since the prior draws the whole Op production into 4% of slots and each of the four then takes a quarter of that. What the column asks is “does this person like modulation that has been worked on”, which is one question.

Source

pub fn n_mod_logic(&self) -> f64

Gate and decision CV: euclid + min + max + and + or + xor + switch.

The euclidean generator belongs with the combiners rather than with the other leaves because what it produces is a gate, which is what the six combiners consume and (for three of them) emit. It also has to be here for an identity reason: a modulation forest of f filled slots with p binary combiners has exactly f + p leaves, so a φ that carried the combiners apart from the euclid would let that equation be reconstructed from n_lfo, n_env, n_rand, n_follow and mod_density. Summing the two sides into one column breaks it.

Source

pub fn to_vec(&self) -> Vec<f64>

Flatten to a vector in Self::NAMES order.

Trait Implementations§

Source§

impl Clone for StructFeatures

Source§

fn clone(&self) -> StructFeatures

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 StructFeatures

Source§

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

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

impl Default for StructFeatures

Source§

fn default() -> StructFeatures

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

impl<'de> Deserialize<'de> for StructFeatures

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for StructFeatures

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Serialize for StructFeatures

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for StructFeatures

Source§

impl StructuralPartialEq for StructFeatures

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,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

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