Collection of digital filters, for audio & dsp applications.
Produce 1024 samples of grey noise:
const noise = require('colors-of-noise/white')
const filter = require('digital-filter/loudness')
//generate frame of grey noise
let data = filter(noise(new Float32Array(1024)))
- leaky integrator
- moving average
- bilinear
- biquad
- loudness
- lowpass
- hipass
- rumble
- flutter
- noise
- bessel
- butterworth
- matched
- elliptical
- linkwitz-riley
- chebyshev
- inverse-chebyshev
- savitzky-golay
- curve (custom f-curve)
Takes input array samples
and params object, modifies samples
in-place. Params object should be shared between subsequent calls.
Params:
lambda
− defines amount of "leak".y
− keeps value of last sample, updated after every call.
let leaky = require('digital-filter/leaky-integrator')
let opts = {lambda: .5}
//render 3 frames
for (let i = 0; i < 3; i++) {
let data = new Float32Array(1024)
leaky(data, opts)
}
Takes input array samples
and params object, modifies samples
in-place. Params object should be shared between subsequent calls.
Params:
memory
− array with initial values of memory. If number, this will create an array of that size.
let ma = require('digital-filter/moving-average')
//average of 5 items
let opts = {memory: 5}
for (let i = 0; i < 3; i++) {
let data = new Float32Array(1024)
ma(data, opts)
}
Implemented filter types:
a
— A-weightingb
— B-weightingc
— C-weightingd
— D-weightingz
— Z-weighting (zero weighting)itu
— ITU-R 468 weighting
- audio-filter − digital filters for audio infrastructure
- colors-of-noise − collection of noise generators