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/lfo

v0.2.0

Published

A LFO (low frequency oscillator) generator audio worklet

Readme

@synthlet/lfo

A low-frequency oscillator with eleven shapes, as an audio worklet

Part of Synthlet.

The modulation source. Web Audio's OscillatorNode gives you four waveforms and none of the ones modulation actually wants — no sample-and-hold, no exponential ramps, no single-sample impulse — and no gain or offset without two more nodes. This is one node with all of it.

It emits a signal, one value per sample, so a slow sine on a pitch or a gain is smooth rather than a 344 Hz staircase.

Install

npm i @synthlet/lfo

Or npm i synthlet for every module at once.

Usage

import { registerLfoWorklet, Lfo, LfoType } from "@synthlet/lfo";

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

const osc = new OscillatorNode(ac, { frequency: 440 });
osc.start();

// ±10 Hz of vibrato at 5 Hz
const vibrato = Lfo(ac, { type: LfoType.Sine, frequency: 5, gain: 10 });
vibrato.connect(osc.frequency);

osc.connect(ac.destination);

Parameters

output = gen(phase) × gain + offset

| Param | Default | Range | Rate | Meaning | | ----------- | ------- | --------- | ------ | ----------------------------- | | type | 1 | 0 … 10 | k-rate | Waveform — see LfoType | | frequency | 10 | 0 … 200 | k-rate | Rate in Hz | | gain | 1 | 0 … 10000 | k-rate | Amplitude | | offset | 0 | ±1000 | k-rate | Where the waveform is centred |

LfoType is None (0), Sine (1), Triangle (2), RampUp (3), RampDown (4), Square (5), ExpRampUp (6), ExpRampDown (7), ExpTriangle (8), RandSampleHold (9) and Impulse (10).

All four parameters are k-rate — what is audio-rate here is the output, which is a different question. type is structural: swapping generator 128 times a block is not waveform modulation, it is noise. The other three are read once per block, which lets the generator hoist its phase increment out of the sample loop; a modulated frequency still moves, one step per render quantum. For an envelope on the depth, put a native GainNode between the LFO and its destination — that is a-rate and free.

Credits

concaveTransform is the MMA concave transform as presented by Will Pirkle (Tritone Systems) in Designing Software Synthesizer Plug-Ins in C++ and SynthLab, including the 5.0/12.0 correction coefficient.

See the repository's THIRD-PARTY-LICENSES.md.

License

MIT © danigb