A-Tractor - v2.3.1
    Preparing search index...

    Class FrequencyAnalyzer

    Frequency analyzer widget.

    Example:

    const audioElement = document.getElementById('audio');
    const viewElement = document.getElementById('div-analyzer');

    const f = new FrequencyAnalyzer(audioElement, viewElement, { fftSize: 256, color: '#ffb21d' });

    // We can start only after user starts interact with our page.
    // This is because of HTML Web Audio API restriction.
    document.body.onclick = () => {
    audioElement.play();
    f.start();
    }

    See more options at interface definition: common.IAbstractAnalyzerOptions

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Changes the current media source.

      Parameters

      • OptionalaudioSource: HTMLMediaElement | MediaElementAudioSourceNode

        Input HTML element with source audio (HTML audio tag) or the instance of MediaElementAudioSourceNode.

      Returns void

    • Updates the canvas size depended on the [[constructor|viewElement]] size.

      Returns void