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

@synthlet/param

v0.2.0

Published

Param generator audio worklet

Readme

@synthlet/param

A value with a unit: the module that makes numbers and nodes interchangeable

Part of Synthlet.

Param is a source node that carries one value — and because it is a node, it can carry a signal instead. That is the whole point: anywhere a Synthlet module takes a parameter, a number and a node are the same kind of thing, and Param is what makes that true.

On the way out it applies a conversion, a gain and an offset, so it is also where units get fixed: decibels into a linear gain, a 0…1 knob into a real range, a sign flip for an inverted modulation.

Install

npm i @synthlet/param

Or npm i synthlet for every module at once.

Usage

import { registerParamWorklet, Param, ParamScaleType } from "@synthlet/param";

const ac = new AudioContext();
await registerParamWorklet(ac);

// A number, modulated by a node
const cutoff = Param(ac, { input: 1200, mod: lfo, gain: 1 });
cutoff.connect(filter.frequency);

// Shortcuts for the common conversions
Param.db(ac, -6); //            decibels to a linear gain
Param.lin(ac, knob, 20, 20000); // a 0…1 input scaled to a range
Param.mul(ac, source, 0.5); //   scaling
Param.inv(ac, source); //        sign inversion
Param.input(ac, 440); //         a plain value

Parameters

output = offset + gain × convert(input + mod)

| Param | Default | Range | Rate | Meaning | | -------- | ------- | ------ | ------ | ------------------------------------------------------ | | input | 0 | ±20000 | a-rate | The signal | | mod | 0 | ±20000 | a-rate | A second signal, summed with input before conversion | | scale | 0 | 0 … 3 | k-rate | Which converter — see ParamScaleType | | min | 0 | ±20000 | k-rate | Bottom of Linear's range; ignored otherwise | | max | 1 | ±20000 | k-rate | Top of the same range | | gain | 1 | ±20000 | k-rate | Applied after the conversion | | offset | 0 | ±20000 | k-rate | Added last |

ParamScaleType is Bypass (0), DbToGain (1), GainToDb (2) or Linear (3).

The split is signal against coefficient. input and mod are what Param carries and are read per sample, so a gate edge or an LFO passes through with its timing intact. The other five describe what it does to them, are set once at construction by every factory above, and are read once per block. With nothing connected — or with a constant connected — the whole block still takes a fill() fast path, so an unautomated Param costs what it always did.

The ±20000 bounds are a safety limit, not a hint for a slider. Unlike a module's own parameters, a Param carries whatever its destination needs — a frequency in Hz, a level in dB, a time in seconds — and has no natural range of its own. scale is the exception; it is bounded by the enum.

License

MIT © danigb