- Status
- calibrated
- Updated
- Family
- filter, 16 packages under it
- Plugins
- 2 processors
- Category
- effects
- Licence
- MIT
- Dependencies
- none
- Downloads
- 2,334 last month
- Tests
- at least 129 in audiojs/filter's CI, passed at 878f618,
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').emphasis()
// "Local Forecast" by Kevin MacLeod (incompetech.com), CC BY 4.0, incompetech.com/music/royalty-free/faq.html
Plugins
deemphasis
alpha- 0.97
- 0.5 to 0.99
emphasis
alpha- 0.97
- 0.5 to 0.99
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.
In the /audio processors alpha is smoothed (20 ms) and glided sample by sample: a host's ramp of it is one line, the same however the host cuts its calls (it hands each call the value at its first frame, so the line is played 32 frames late); held, it is the value itself.
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