@audio/ filter-comb
Status calibrated
npm1.1.3licenseMIT
Comb filter — feedforward (FIR) and feedback (IIR)
import comb from '@audio/filter-comb'
Adds a delayed copy of the signal to itself — notches and peaks at harmonics of .
Feedforward: — dips at , depth depends on : a true null only at ; the default gives a dip, not a notch
Feedback: — peaks at
comb(buffer, { delay: 100, gain: 0.6, type: 'feedback' })
| Param | Default | |
|---|---|---|
delay |
— | required, delay length in samples (D) |
gain |
0.5 |
feedforward/feedback coefficient g |
type |
'feedforward' |
'feedforward' (FIR, dips) or 'feedback' (IIR, peaks) |
Pass the same params object on every call — the ring buffer and write pointer persist across blocks:
let params = { delay: 100, gain: 0.6, type: 'feedback' }
for (let buf of stream) comb(buf, params)
Use when: flanging, chorus (with modulated delay), Karplus-Strong string synthesis, room mode modeling.
Part of @audio/filter — the filter family umbrella. This README is generated from the umbrella docs.
MIT © audiojs