Hierarchy

Constructors

Properties

alpha: undefined | number
canvas: HTMLCanvasElement
colorMap: undefined | number[][] | "gray" | "igray" | "roseus"
container: HTMLElement
fftSamples: undefined | number
frequenciesDataUrl?: string
frequencyMax: undefined | number
frequencyMin: undefined | number
gainDB: undefined | number
height: undefined | number
labelsEl: HTMLCanvasElement
noverlap: undefined | number
numBarkFilters: number
numErbFilters: number
numLogFilters: number
numMelFilters: number
rangeDB: undefined | number
scale: undefined | "linear" | "logarithmic" | "mel" | "bark" | "erb"
spectrCc: CanvasRenderingContext2D
subscriptions: (() => void)[] = []

Type declaration

    • (): void
    • Returns void

wavesurfer?: default
windowFunc: undefined | "bartlett" | "bartlettHann" | "blackman" | "cosine" | "gauss" | "hamming" | "hann" | "lanczoz" | "rectangular" | "triangular"
wrapper: HTMLElement

Methods

  • Do not call directly, only called by WavesSurfer internally

    Parameters

    Returns void

  • Parameters

    • fftPoints: Float32Array
    • filterBank: number[][]

    Returns Float32Array

  • Parameters

    • numBarkFilters: number
    • sampleRate: number

    Returns number[][]

  • Parameters

    • numErbFilters: number
    • sampleRate: number

    Returns number[][]

  • Parameters

    • numFilters: number
    • sampleRate: number
    • hzToScale: ((hz) => number)
        • (hz): number
        • Parameters

          • hz: number

          Returns number

    • scaleToHz: ((scale) => number)
        • (scale): number
        • Parameters

          • scale: number

          Returns number

    Returns number[][]

  • Parameters

    • numLogFilters: number
    • sampleRate: number

    Returns number[][]

  • Parameters

    • numMelFilters: number
    • sampleRate: number

    Returns number[][]

  • Parameters

    • frequenciesData: Uint8Array[][]

    Returns void

  • Emit an event

    Type Parameters

    • EventName extends "click" | "ready" | "destroy"

    Parameters

    Returns void

  • Parameters

    • buffer: AudioBuffer

    Returns Uint8Array[][]

  • Parameters

    • index: number
    • labelIndex: number
    • hzToScale: ((hz) => number)
        • (hz): number
        • Parameters

          • hz: number

          Returns number

    • scaleToHz: ((scale) => number)
        • (scale): number
        • Parameters

          • scale: number

          Returns number

    Returns number

  • Parameters

    • bgFill: any
    • fontSizeFreq: any
    • fontSizeUnit: any
    • fontType: any
    • textColorFreq: any
    • textColorUnit: any
    • textAlign: any
    • container: any
    • channels: any

    Returns void

  • Subscribe to an event. Returns an unsubscribe function.

    Type Parameters

    • EventName extends "click" | "ready" | "destroy"

    Parameters

    • event: EventName
    • listener: EventListener<SpectrogramPluginEvents, EventName>
    • Optional options: {
          once?: boolean;
      }
      • Optional once?: boolean

    Returns (() => void)

      • (): void
      • Subscribe to an event. Returns an unsubscribe function.

        Returns void

  • Subscribe to an event only once

    Type Parameters

    • EventName extends "click" | "ready" | "destroy"

    Parameters

    Returns (() => void)

      • (): void
      • Subscribe to an event only once

        Returns void

  • Unsubscribe from an event

    Type Parameters

    • EventName extends "click" | "ready" | "destroy"

    Parameters

    Returns void

  • Clear all events

    Returns void

Generated using TypeDoc