• Sine oscillator.

    import { Oscillators } from "https://unpkg.com/ixfx/dist/modulation.js"
    import { frequencyTimer } from "https://unpkg.com/ixfx/dist//flow.js";
    // Setup
    const osc = Oscillators.sine(frequencyTimer(10));
    const osc = Oscillators.sine(0.1);

    // Call whenever a value is needed
    const v = osc.next().value;

    Parameters

    • timerOrFreq: number | Timer

    Returns Generator<number, void, unknown>

    const v = Math.pow(osc.value, 2);
    
    const v = Math.pow(osc.value, 0.5);