Clarity Module — Dynamic Mud, Mid & Air Reduction

Reduces low-mid mud (~350 Hz), boxes mids (~1.2 kHz), and tames harshness (~4 kHz) using three parallel bandpass filters feeding independent compressors, mixed back with the dry signal via clarityAmount.

Files

static/js/synth/modules/clarity.js (~260 lines)

Signal Flow

input ──→ split ──→ [SC HPF]? ──→ mudBPF → mudComp → mudMakeup → mudPhase → mudListen →┐
                               ├──→ midBPF → midComp → midMakeup → midPhase → midListen →├→ wetSum → wetGain → output
                               ├──→ airBPF → airComp → airMakeup → airPhase → airListen →┘         → dryGain → output
                               └──→ dry path (muted when any listen solo or wet-only on)

When clarityAmount <= 0 and no listen/solo band is active, the module is completely bypassed — returns input unchanged.

Parameters

Master controls

Param Range Default Description
clarityAmount 0–1 0 Wet/dry mix. 0 = bypassed
clarityWetOnly off/on off Mute dry signal, hear only processed bands
claritySCFreq 20–500 Hz 100 HPF before each band's compressor (prevents low-frequency triggering)

Mud band (low-mid)

Param Range Default Description
mudFreq 200–800 Hz 350 Hz Bandpass centre frequency
mudQ 0.5–5 2 Bandpass filter Q (bandwidth)
mudThresh –40–0 dB –18 dB Compressor threshold
mudRatio 1–10 3 Compression ratio
mudAttack 0.001–0.1 s 0.01 s Compressor attack
mudRelease 0.01–0.5 s 0.05 s Compressor release
mudMakeup 0–12 dB 0 Post-compression gain boost
mudListen off/on off Solo this band
mudPhase normal/invert normal Polarity invert (fixes phase cancellation)
mudBypass off/on off Bypass processing for this band

Mid band

Param Range Default Description
midFreq 500–3000 Hz 1200 Hz Bandpass centre frequency
midQ 0.5–5 1 Bandpass filter Q
midThresh –40–0 dB –18 dB Compressor threshold
midRatio 1–10 3 Compression ratio
midAttack 0.001–0.1 s 0.008 s Compressor attack
midRelease 0.01–0.5 s 0.04 s Compressor release
midMakeup 0–12 dB 0 Post-compression gain boost
midListen off/on off Solo this band
midPhase normal/invert normal Polarity invert
midBypass off/on off Bypass processing

Air band (high-mid)

Param Range Default Description
airFreq 2000–8000 Hz 4000 Hz Bandpass centre frequency
airQ 0.5–5 1 Bandpass filter Q
airThresh –40–0 dB –15 dB Compressor threshold
airRatio 1–10 4 Compression ratio
airAttack 0.001–0.05 s 0.005 s Compressor attack
airRelease 0.01–0.3 s 0.03 s Compressor release
airMakeup 0–12 dB 0 Post-compression gain boost
airListen off/on off Solo this band
airPhase normal/invert normal Polarity invert
airBypass off/on off Bypass processing

Listen/solo logic: When any band has Listen: on, all other bands and the dry signal are muted — only that band passes through to the output. Multiple bands can be listened to simultaneously (acts as a solo-group).

Phase invert: Inverts the polarity of the band's output by inserting a GainNode with gain −1 before the wet sum. Useful when bandpass filters introduce phase shifts that cause cancellation when mixed back with the dry signal.

Bypass: Routes the split input directly to the band's output, skipping the BPF and compressor. The band's signal still passes through, just unprocessed.

Exports

Export Signature Purpose
paramDefs 30 parameter definitions for UI generation
build (ctx, params, chainInput, dur) Create clarity chain or return chainInput if bypassed
update (nodes, params) Update all compressor, filter, gain, listen, phase, and bypass parameters

Integration

Added to any engine's modules array as a processor type. The backward loop in buildLiveChain wires it automatically between the previous processor and masterGain.

{
  id: 'clarity', label: 'Clarity', colour: '#2ecc71', type: 'processor',
  description: 'Reduces low-mid mud and high-mid harshness using band-specific compression.',
  noSeqRandomise: true,
  noSectionLock: true,
  params: clarityMod.paramDefs,
  build: function (ctx, params, input, dur) { return clarityMod.build(ctx, params, input, dur); },
}

Flags

  • noSeqRandomise: true — protected from sequencer randomise
  • noSectionLock: true — no lock icon in UI (mix-critical settings)
  • All params have lockable: false — individual lock icons hidden

See Also