@audio/ filter-preemphasis
Status calibrated
npm1.1.3licenseMIT
Pre-emphasis / de-emphasis filter
import { emphasis, deemphasis } from '@audio/filter-preemphasis'
First-order highpass (emphasis) and its inverse (de-emphasis) — used before and after coding or transmission.
(emphasis) / (de-emphasis)
Rolloff: emphasis boosts above — gives ~210 Hz at 44.1 kHz
Inverse pair: deemphasis exactly cancels emphasis — (round-trip error ~5.5e-17)
emphasis(buffer, { alpha: 0.97 }) // before encoding
deemphasis(buffer, { alpha: 0.97 }) // after decoding — exact inverse
| Function | Param | Default | |
|---|---|---|---|
emphasis |
alpha |
0.97 |
GSM/AMR speech coding convention |
deemphasis |
alpha |
0.97 |
must match the emphasis call it inverts |
Pass the same params object on every call to persist the one-pole state across blocks.
Use when: speech coding (GSM, AMR uses ), tape recording, FM broadcasting.
Part of @audio/filter — the filter family umbrella. This README is generated from the umbrella docs.
MIT © audiojs