depolarizer
depolarizer · utilities · schema v1DEPOLARIZER — a tiny 1-in / 1-out CV utility: the reverse of POLARIZER, converting a BIPOLAR control voltage back to a UNIPOLAR one. Model: out = 0.5 + DEPTH · (in / 2) — it folds a [−1, +1] input into [0, 1]. Computed sample-accurately by a pure Web Audio graph (a GainNode for the scale + a started ConstantSourceNode → GainNode for the fixed +0.5 center, both summed; no worklet, no DSP build). Controls — DEPTH: the single knob, range 0..1 on a LINEAR taper, sets how far the output DEPARTS from the 0.5 CENTER; default 1.0 = the FULL conversion (in=−1 → 0, in=0 → 0.5, in=+1 → 1), 0.5 → output swings only 0.25..0.75, 0 → flat 0.5. DEPTH attenuates only the DEVIATION from center (it scales the slope, not the offset), so the output always rests at the 0.5 unipolar center with nothing patched or at DEPTH 0 — the natural "neutral" value. IO — IN (cv): the bipolar (−1..+1) control voltage to depolarize (the affine map is defined for any value); OUT (cv): the unipolar result centered on 0.5. All patching is via the card's yellow drill-down PATCH PANEL — no side jacks. DEPTH is MIDI / control-surface assignable (right-click → MIDI Learn). Usage: feed a bipolar LFO / sequencer / ±1 modulation source into a destination that expects a 0..1 CV (a level / depth / mix-knob CV), with DEPTH trimming the modulation amount around the 0.5 rest point; the inverse of POLARIZER for the round trip.
the faceplate
inputs
| id | cable | what it does |
|---|---|---|
in | cv | The bipolar control voltage to depolarize, expected -1..+1 (e.g. an LFO or sequencer output). Any value is mapped linearly; the labeled use is ±1 in, 0..1 out. control voltage (CV) |
outputs
| id | cable | what it does |
|---|---|---|
out | cv | The unipolar result, out = 0.5 + depth·(in/2), centered on 0.5. At depth 1: in=-1 gives 0, in=0 gives 0.5, in=+1 gives 1. control voltage (CV) |
params
| id | label | range | default | curve |
|---|---|---|---|---|
depth | DEPTH | 0..1 | 1 | linear |
controls
| control | what it does |
|---|---|
| DEPTH | Sets how far the output departs from the 0.5 center, on a linear 0..1 fader — it scales only the slope, never the center. 1 (default) = the full bipolar→unipolar conversion (in=±1 reaches 0/1); 0.5 = a half-strength swing (output only moves 0.25..0.75); 0 = flat 0.5 regardless of input. So it attenuates the modulation depth around the neutral center. |
source
depolarizer.ts on GitHub.