audioJS

@audio/dynamics-opto

Status pending calibration

npm0.2.5licenseMIT

Optical compressor model — RMS detector, wide knee, T4 program-dependent release (LA-2A class)

Overview

Install
Updated
Family
dynamics, 17 packages under it
Tags
shape

Optical compressor model (LA-2A class) — RMS detection, wide soft knee, program-dependent release

import opto from '@audio/dynamics-opto'

Models a Teletronix LA-2A-style electro-optical gain cell: RMS-detected soft-knee compression (~3:1, wide 10 dB knee) plus the T4 cell's signature — release time that slows the longer gain reduction persists. An internal ~3 s memory of time-under-reduction stretches release up to 7× on sustained material, then relaxes back toward the nominal value once the signal clears.

opto(data, { threshold: -20, ratio: 3 })                 // batch
opto(data)                                                 // defaults

let write = opto({ threshold: -20, ratio: 3 })            // streaming
let out1 = write(block1)
let tail = write()                                         // flush
Param Default
threshold -20 dB
ratio 3 —
knee 10 dB (wide)
attack 10 ms
release 300 ms (nominal; program-dependent stretch multiplies this up to 7×)
makeup 0 dB
sampleRate 44100 Hz (alias fs)

Use when: vocals, bass — smooth, program-dependent gain riding without pumping.
Not for: fast peak-catching character — use fet. Aggressive drive-dependent ratio — use varimu.


Part of @audio/dynamics — the dynamics family umbrella.

MIT © audiojs