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

@e9g/buffered-audio-nodes-utils

v0.1.3

Published

Shared DSP utilities for the buffered-audio-nodes ecosystem.

Downloads

191

Readme

@e9g/buffered-audio-nodes-utils

Shared DSP utilities for the buffered-audio-nodes ecosystem.

Install

npm install @e9g/buffered-audio-nodes-utils

Peer dependency: @e9g/buffered-audio-nodes-core

API

STFT / FFT

import { stft, istft, fft, ifft, hanningWindow, MixedRadixFft } from "@e9g/buffered-audio-nodes-utils";

| Function | Description | | --- | --- | | stft(signal, fftSize, hopSize, window?) | Short-Time Fourier Transform with tiered backend dispatch | | istft(frames, fftSize, hopSize, window?) | Inverse STFT (overlap-add reconstruction) | | fft(real, imag) | Forward FFT (Cooley-Tukey radix-2, in-place) | | ifft(real, imag) | Inverse FFT (in-place) | | hanningWindow(size) | Generate a Hann window of the given size | | MixedRadixFft | FFT class for non-power-of-2 sizes | | createFftWorkspace(size) | Allocate reusable FFT scratch buffers | | bitReverse(...) | Bit-reversal permutation | | butterflyStages(...) | Radix-2 butterfly computation |

const window = hanningWindow(2048);
const frames = stft(signal, 2048, 512, window);

// ... process frames ...

const reconstructed = istft(frames, 2048, 512, window);

FFT Backend

import { initFftBackend, detectFftBackend, getFftAddon } from "@e9g/buffered-audio-nodes-utils";
import type { FftBackend, FftBackendConfig } from "@e9g/buffered-audio-nodes-utils";

| Function | Description | | --- | --- | | initFftBackend(config) | Initialize the native FFT backend | | detectFftBackend(config) | Auto-detect the best available backend | | getFftAddon(config) | Get the loaded native addon |

The FFT backend uses tiered dispatch to select the fastest available implementation:

  1. VkFFT (GPU via Vulkan) -- highest throughput for large transforms
  2. FFTW (native CPU) -- optimized native fallback
  3. JavaScript -- pure JS fallback, always available

stft and istft automatically use the best initialized backend.

await initFftBackend({ backend: "vkfft" });

Native addon repositories:

Biquad Filters

import {
	biquadFilter,
	zeroPhaseBiquadFilter,
	highPassCoefficients,
	lowPassCoefficients,
	bandPassCoefficients,
	preFilterCoefficients,
	rlbFilterCoefficients,
	bandpass,
} from "@e9g/buffered-audio-nodes-utils";
import type { BiquadCoefficients } from "@e9g/buffered-audio-nodes-utils";

| Function | Description | | --- | --- | | biquadFilter(samples, coefficients, state) | Apply a biquad IIR filter | | zeroPhaseBiquadFilter(samples, coefficients) | Zero-phase (forward-backward) biquad filter | | highPassCoefficients(frequency, sampleRate, Q?) | Design a high-pass biquad filter | | lowPassCoefficients(frequency, sampleRate, Q?) | Design a low-pass biquad filter | | bandPassCoefficients(frequency, sampleRate, Q?) | Design a band-pass biquad filter | | preFilterCoefficients(sampleRate) | BS.1770-4 pre-filter (high shelf at ~1500 Hz) | | rlbFilterCoefficients(sampleRate) | BS.1770-4 RLB weighting filter | | bandpass(signal, low, high, sampleRate) | Convenience bandpass using cascaded biquads |

const coeffs = lowPassCoefficients(1000, 48000);
const state = { x1: 0, x2: 0, y1: 0, y2: 0 };
const filtered = biquadFilter(samples, coeffs, state);

Channel Operations

import { interleave, deinterleaveBuffer, replaceChannel } from "@e9g/buffered-audio-nodes-utils";

| Function | Description | | --- | --- | | interleave(channels) | Interleave per-channel arrays into a single buffer | | deinterleaveBuffer(buffer, channelCount) | Deinterleave a buffer into per-channel arrays | | replaceChannel(samples, channelIndex, replacement) | Replace a single channel in an interleaved buffer |

Level Conversion

import { dbToLinear, linearToDb } from "@e9g/buffered-audio-nodes-utils";

| Function | Description | | --- | --- | | dbToLinear(db) | Convert decibels to linear amplitude | | linearToDb(linear) | Convert linear amplitude to decibels |

Envelope / Resampling

import { smoothEnvelope, resampleDirect } from "@e9g/buffered-audio-nodes-utils";

| Function | Description | | --- | --- | | smoothEnvelope(signal, attackSamples, releaseSamples) | Attack/release envelope follower | | resampleDirect(signal, fromRate, toRate) | Sample rate conversion via direct resampling |

License

ISC