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

@jpdutoit/squelchy

v0.0.6

Published

Modular synth modules for plain Web Audio: oscillators, filters, envelopes, effects and drum kits as native-feeling nodes, with AudioWorklet DSP inlined and tree-shakeable.

Readme

@jpdutoit/squelchy

The modules behind Squelchy, the modular synth in your browser, as plain Web Audio building blocks. Oscillators, filters, envelopes, effects and drum kits behave like native nodes: you connect() them, and parameters that drive the sound 1:1 are real AudioParams you can automate.

  • Zero dependencies, zero asset setup. AudioWorklet processors are inlined and registered from blob URLs.
  • Tree-shakeable. Import one module and only its worklets end up in your bundle.
  • Typed units. Notes, semitones, Hz, seconds and beats are distinct types, so mixing them up is a compile error.
npm install @jpdutoit/squelchy

Quick start

import { preload, Vco, Lfo, Delay, semitones, sec, hz } from '@jpdutoit/squelchy';

const ctx = new AudioContext();
await preload(ctx); // registers the worklets of the modules you import

const vco = Vco.create(ctx, { offset: semitones(57) }); // nothing in voct = note 0 (C-1); 57 semitones up = A3
const lfo = Lfo.create(ctx, { frequency: hz(5), amount: semitones(0.3) });
const delay = Delay.create(ctx, { time: sec(0.3), feedback: 0.4, mix: 0.35 });

lfo.out.connect(vco.modDetune); // vibrato
vco.out.connect(delay.in);
delay.out.connect(ctx.destination);

// Parameters that map 1:1 onto the DSP are native AudioParams.
delay.params.mix.linearRampToValueAtTime(0.8, ctx.currentTime + 2);

Browsers only start audio after a user gesture, so create or resume() the AudioContext inside a click handler.

Importing the package is safe on the server (SSR, Node tests): nothing touches Web Audio until you call preload() or create(), so a static import in shared code is fine.

Patterns and time

Musical positions are plain numbers in beats, and patterns are plain arrays.

import { createTransport, steps, Kick, Hat } from '@jpdutoit/squelchy';

const ctx = new AudioContext();
const transport = createTransport(ctx, { bpm: 120 });
const kick = Kick.create(ctx);
const hat = Hat.create(ctx);
kick.connect(ctx.destination);
hat.connect(ctx.destination);

transport.play(steps('x...x...x...x...'), kick);
transport.play(steps('..x...x...x...x.'), hat);
transport.start();

Sample kits

Drum kits are CC0 / public domain and ship inside the package, one import per kit. Your bundler copies and hashes the sound files of the kits you import, and only those. The full list is in docs/GUIDE.md.

import { loadSampleSet, SampleVoice, now } from '@jpdutoit/squelchy';
import { Roland808 } from '@jpdutoit/squelchy/kits/roland-808';

const ctx = new AudioContext();
const kit = await loadSampleSet(ctx, Roland808);
const bd = SampleVoice.create(ctx, kit, 'bd');
bd.connect(ctx.destination);
bd.trigger(now(ctx)); // times are typed Seconds; now(ctx) is ctx.currentTime

Vite 6 or 7: add optimizeDeps: { exclude: ['@jpdutoit/squelchy'] } to vite.config, or kit sounds fail to load in the dev server (production builds work either way). Vite 8 needs nothing. Details in docs/GUIDE.md.

Reference

  • docs/GUIDE.md: recipes for scheduling (transport options, automation at musical positions, synced visuals), sequencing synth voices, pulse() actions, units, sample kits and offline rendering.
  • docs/MODULES.md: every module's ports, parameters, ranges and defaults, and which parameters are automatable (the rest change instantly with set()).
  • docs/modules.json: the same reference keyed by export name, for jq (e.g. jq '.Delay' node_modules/@jpdutoit/squelchy/docs/modules.json).
  • Types need the DOM lib in your tsconfig.json.
  • Under a strict Content-Security-Policy, allow worker-src blob: so the worklets can load.