npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@audio/eq

v1.1.0

Published

Equalization & tone shaping — umbrella for @audio/eq-* atoms (shelves, parametric, graphic, baxandall, tilt, crossover)

Readme

@audio/eq

Equalization and tone shaping for mono PCM in Node.js and browsers. Import named functions from the umbrella, or install a leaf package for one processor. Both imports use the same implementation and types.

npm install @audio/eq
import { parametricEq } from '@audio/eq'

const fs = 48000
const input = new Float32Array(512)
input[0] = 1 // impulse; replace with your mono PCM samples
const params = { bands: [{ fc: 1000, Q: 1, gain: -6 }], fs }
const output = parametricEq(input.slice(), params)
console.log(output.length) // 512; input is preserved because we passed a copy

For the same operation from a leaf: npm install @audio/eq-parametric, then import parametricEq from '@audio/eq-parametric'. TypeScript declarations ship with both packages.

API

| Umbrella export | Leaf / detailed options | Input → output and state | |---|---|---| | lowShelf, highShelf | eq-lowshelf, eq-highshelf | PCM + params → same buffer; reuse params for successive chunks | | parametricEq | eq-parametric | PCM + { bands, fs } → same buffer; reuse params for successive chunks | | graphicEq | eq-graphic | PCM + { gains, fs } → same buffer; reuse params for successive chunks | | baxandall | eq-baxandall | PCM + bass/treble params → same buffer; reuse params for successive chunks | | tilt | eq-tilt | PCM + { gain, pivot, fs } → same buffer; reuse params for successive chunks | | crossover | eq-crossover | Hz crossover points + order + fs → per-band SOS coefficients; does not process audio | | firEq, firDesign | eq-fir | firDesign(response, opts) → coefficients; firEq(data, opts) → same buffer, whole-buffer processing | | dynamicEq | eq-dynamic | PCM + band params → same buffer, whole-buffer processing | | fitEq, eqResponse, toEqualizerApo, fromEqualizerApo | eq-fit | Curve fitting, response evaluation and text interchange; do not process audio |

Most leaves export their processor as default. The FIR leaf's named design is firDesign here; the fit leaf's default fit and named response become fitEq and eqResponse.

Processing expectations

  • Frequencies and fs are Hz; fs defaults to 44100. Gains are dB. Dynamic-EQ attack/release are milliseconds. Use each leaf's options for Q versus shelf-slope conventions.
  • Shelves, parametric, graphic, Baxandall and tilt accept Float32Array, Float64Array or number[]. Their params object is required even when empty. They mutate the supplied buffer and return that exact reference, preserving its array type.
  • These stateful filters store coefficients and history on params. Keep one params object per channel/instance and reuse it across chunks. Use a fresh object to reset. Parameter changes rebuild the affected filters; they are not automatically smoothed for live modulation.
  • firEq accepts typed arrays and compensates FIR group delay by reading ahead within the whole buffer, with zero-padded edges. dynamicEq takes Float32Array and starts its detector/filter state fresh each call. Neither function preserves history between chunks.
  • fitEq returns bands, fit error and a suggested preamp. Apply that preamp separately when processing the bands; parametricEq does not apply it. Check resulting peaks: a magnitude-response headroom estimate does not guarantee a time-domain peak ceiling.

To process successive chunks with the example's EQ, call parametricEq(chunk, params) for each chunk. To preserve each original, pass chunk.slice(). Do not share that params object between left and right channels.

The /audio exports available on some leaves are host processor factories, a separate API from these buffer functions. Consult their parameter metadata for restart and streaming limits; a buffer function's existence does not establish AudioWorklet or native-plugin support.

Extracted from filter. Headphone crossfeed lives in @audio/spatial-crossfeed.