JSPM

@synthlet/lfo

0.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 1
    • Score
      100M100P100Q14209F
    • License MIT

    A LFO (low frequency oscillator) generator audio worklet

    Package Exports

    • @synthlet/lfo
    • @synthlet/lfo/dist/index.js
    • @synthlet/lfo/dist/index.mjs

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@synthlet/lfo) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    @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.