@synthlet/lfo
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

@synthlet/lfo

LFO generator module for synthlet

import { registerLfoWorklet, createLfo } from "synthlet"; // or "@synthlet/lfo";

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

// Create a destination node
const osc = new OscillatorNode(audioContext, { frequency: 440 });

// Create the low frequency oscillator
const lfo = createLfo(audioContext, {
  type: "RandSampleAndHold"
  gain: 10,
  frequency: 1,
});

// Connect to destination parameter
lfo.connect(osc.frequency);

Install

Full package:

npm i synthlet

Just this module:

npm i @synthlet/lfo

Usage

You need to register the audio worklet before creating any instrument. See [/README.md#register] for details.

/@synthlet/lfo/

    Package Sidebar

    Install

    npm i @synthlet/lfo

    Weekly Downloads

    0

    Version

    0.1.0

    License

    MIT

    Unpacked Size

    42.5 kB

    Total Files

    8

    Last publish

    Collaborators

    • danigb