audio

@audio/dynamics-expander0.3.0

Downward expander

Downward expander: reduces gain below threshold by (T-L)·(ratio-1) dB,

Status
pending calibration
Updated
Family
dynamics, 17 packages under it
Plugin
expander, effect, streaming, 8 parameters
Category
effects
Licence
MIT
Dependencies
1 package, all permissive: MIT
Downloads
4,237 last month
Tests
92 in audiojs/dynamics's CI, passed at 2ee3ad9,

Listen

// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html
audio('/samples/music/modern/local-forecast.mp3').expander()

// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html

Parameters

  • effect
  • streaming
  • key input
mode
downward, upward
threshold
−30 dB
−80 to 0 dB
ratio
2
1 to 20
knee
6 dB
0 to 24 dB
range
40 dB
0 to 90 dB
attack
5 ms
0.1 to 100 ms
release
50 ms
1 to 1000 ms
link
0
0 to 1
import expander from '@audio/dynamics-expander'

Downward expander (mode: 'downward', default) — a softer gate. Below threshold, gain is reduced by (threshold − level) × (ratio − 1) dB, clamped at range.

mode: 'upward' switches to upward expansion — the de-compression complement, raising gain above threshold instead of cutting it below. Classical substrate for de-limiting: transient-aware upward expansion restores crest factor a brickwall limiter (or an over-eager mix bus compressor) flattened. Same four-quadrant taxonomy as compressor's upward mode (Giannoulis/Reiss; Izhaki, Mixing Audio).

import expander from '@audio/dynamics-expander'

expander(data, { threshold: -30, ratio: 2 })

// de-limiting: expand transients back out above threshold
expander(data, { mode: 'upward', threshold: -20, ratio: 1.5, range: 20 })
Param Default
mode 'downward' 'downward' | 'upward'
threshold -30 dB
ratio 2 —
knee 6 dB
range -40 (downward) / 20 (upward) dB, max reduction (downward, negative) or max lift (upward, positive)
attack 5 ms
release 50 ms

Use when: gentle noise-floor suppression without the abruptness of a gate (downward); restoring dynamics to over-compressed or over-limited material (upward).
Not for: hard removal of sound between phrases — use gate.


Part of @audio/dynamics — the dynamics family umbrella. This README is generated from the umbrella docs.

MIT © audiojs