audioJS

@audio/filter-dcblocker

Status calibrated

npm1.1.3licenseMIT

DC blocking filter

Overview

Install
Updated
Family
filter, 16 packages under it
Tags
shape
import dcBlocker from '@audio/filter-dcblocker'

Removes DC offset — the simplest useful filter.

H(z)=1−z−11−Rz−1H(z) = \dfrac{1 - z^{-1}}{1 - Rz^{-1}}

Topology: zero at z=1z = 1 (DC), pole at z=Rz = R
Cutoff: fc≈(1−R)fs2πf_c \approx \frac{(1-R) f_s}{2\pi} — R=0.995R = 0.995 gives ~35 Hz at 44.1 kHz

let params = { R: 0.995 }
dcBlocker(buffer, params)
Param Default
R 0.995 pole radius — closer to 1 pushes the cutoff lower

Pass the same params object on every call to persist the one-pole state across blocks.

Use when: removing DC bias before processing, preventing lowpass filter saturation.


Part of @audio/filter — the filter family umbrella. This README is generated from the umbrella docs.

MIT © audiojs