a-weighting
v2.0.1
Published
A/B/C/D/Z/M frequency weighting functions for audio
Downloads
1,115
Readme
a-weighting 
Standard frequency weighting curves (IEC 61672, ITU-R 468) for approximating equal-loudness contours of human ear.
Usage
import { a } from 'a-weighting'
// apply a-weighting to frequency spectrum
let weighted = frequencies.map((magnitude, i, data) => {
let frequency = 22050 * i / data.length
return a(frequency) * magnitude
})Returns normalized 0..1 weight values, not decibels. To convert: 20 * Math.log10(weight).
Weights
| Export | Standard | Description |
|--------|----------|-------------|
| a | A-weighting | General noise measurement |
| b | B-weighting | Moderate loudness |
| c | C-weighting | High loudness |
| d | D-weighting | Aircraft noise |
| m | ITU-R 468 | Telecommunications |
| z | Z-weighting | Flat (unity gain) |
See also
- audio-filter - Audio filters including IIR A/C/K weighting for sample processing.
- Equal-loudness contours
