feature cv
featurecv · modulation · schema v1FEATURECV — an audio→CV feature extractor. Takes ONE audio input and turns the WHOLE signal's timbre + dynamics into control voltages plus an onset trigger, time-domain only (no FFT) so it is fully deterministic. Deliberately distinct from SYNESTHESIA (per-band energy/gates/onsets); featurecv analyses the broadband signal. Features — LOUD (cv): broadband RMS = overall loudness/energy. BRIGHT (cv): zero-crossing rate, a cheap spectral-brightness proxy (high = hissy/trebly, low = dark/bassy). PUNCH (cv): crest factor (peak ÷ RMS) = how spiky/transient vs sustained/compressed. ONSET (gate, edge=trigger): a short pulse that fires ONCE on each fresh attack/transient (time-domain spectral-flux peak-pick with an adaptive threshold + debounce). The three feature CVs are emitted BIPOLAR (−1..+1) by DEFAULT so a strong feature sweeps a knob-centred destination's FULL range; the POLARITY toggle switches to UNIPOLAR (0..1) for envelope-style modulation. Controls — GAIN: input trim into the analyser (×0.25..×4 log, unity at noon). ATK / REL: attack + release smoothing (ms, log) of the three feature CVs. POLARITY: BI [-1,+1] (default) / UNI [0,1]. SENS: onset sensitivity (linear; higher fires on smaller transients). DEBNCE: onset debounce (ms, log; minimum gap between triggers). DSP is own-code (clean-room) in packages/dsp/src/lib/featurecv-dsp.ts, reusing the synesthesia EnvFollower one-pole + applyBipolar + the time-domain flux-onset idea; the worklet wraps it (the SYNESTHESIA/SPECTROGRAPH analyser pattern: GAIN GainNode → worklet → per-feature output GainNodes + a muted keep-alive so process() runs while outputs are unpatched). The card shows live LOUD/BRIGHT/PUNCH meters + an ONSET blink (display only — never writes the live Y.Doc). All patching is via the card's yellow drill-down PATCH PANEL — no side jacks; every knob is MIDI / control-surface assignable. Usage: patch LOUD into a VCA/filter to track dynamics, BRIGHT into a filter cutoff so the timbre opens as the source brightens, PUNCH into modulation that should react to transients, and ONSET into an envelope generator or drum voice to fire on each hit.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
in | audio | The audio signal to analyse — the measured signal, not a modulator. Its loudness, brightness, and transients drive every output. Patch a drum bus, vocal, synth voice, or full mix here. audio signal |
outputs
| id | cable | what it does |
|---|---|---|
loud | cv | LOUD CV — the broadband RMS (overall energy / loudness) of the input, smoothed by ATTACK/RELEASE. Patch into a VCA gain or filter cutoff to make a destination track how loud the source is. Polarity set by the POLARITY toggle. control voltage (CV) |
bright | cv | BRIGHT CV — a brightness proxy from the zero-crossing rate: high when the sound is hissy / trebly (cymbals, noise, bright synths), low when it is dark / bassy. Patch into a filter cutoff so the timbre opens with the source's brightness. Polarity set by POLARITY. control voltage (CV) |
punch | cv | PUNCH CV — the crest factor (peak ÷ RMS): high for spiky, transient, percussive material and low for sustained, compressed tones. Patch into modulation you want to react to how punchy the source is. Polarity set by POLARITY. control voltage (CV) |
onset | gate | ONSET trigger — fires a short pulse ONCE on each detected attack (a fresh transient / hit) in the input, a clean rising edge that crosses the gate threshold. Patch into an envelope generator, VCA, or drum voice to strike it from the live source. SENS sets how readily it fires; DEBNCE sets the minimum gap between pulses. gate / trigger; trigger — fires once per rising edge |
params
| id | label | range | default | curve |
|---|---|---|---|---|
gain | Gain | 0.25..4 | 1 | log |
attack | Atk | 0.5..500ms | 10 | log |
release | Rel | 1..2000ms | 100 | log |
bipolar | Polarity | 0..1 | 1 | discrete |
onset_sens | Sens | 0..1 | 0.5 | linear |
onset_debounce | Debnce | 20..1000ms | 80 | log |
controls
| control | what it does |
|---|---|
| Atk | How fast the feature CVs RISE toward a new value (ms, log) — short attack snaps to transients, long attack glides smoothly past them. Applies to LOUD, BRIGHT, and PUNCH. |
| Polarity | POLARITY of the three feature CV outputs — BIPOLAR (−1..+1, the default, so a strong feature sweeps a knob-centred destination's full range) vs UNIPOLAR (0..1, classic envelope-style). Toggle on the card; does not affect the ONSET trigger. |
| Gain | Input trim into the analyser (×0.25..×4, log, unity at noon) — boost a quiet source so its features reach a usable CV range, or tame a hot one. It shapes the ANALYSIS level, not an audio output (there is none). |
| Debnce | ONSET debounce (ms, log) — the minimum time between onset triggers, a lockout that blocks a re-trigger on a transient's ringing tail so one hit makes exactly one pulse. |
| Sens | ONSET sensitivity — higher lowers the detector's adaptive threshold so it fires on smaller transients; lower only triggers on strong, clear attacks. Tune to taste against your source. |
| Rel | How fast the feature CVs FALL back when the input quietens or changes (ms, log) — short release tracks every dip, long release holds a smooth contour. Applies to LOUD, BRIGHT, and PUNCH. |
source
featurecv.ts on GitHub.