Type alias SpectrogramPluginOptions

SpectrogramPluginOptions: {
    alpha?: number;
    colorMap?: number[][] | "gray" | "igray" | "roseus";
    container?: string | HTMLElement;
    fftSamples?: number;
    frequencyMax?: number;
    frequencyMin?: number;
    gainDB?: number;
    height?: number;
    labels?: boolean;
    labelsBackground?: string;
    labelsColor?: string;
    labelsHzColor?: string;
    noverlap?: number;
    rangeDB?: number;
    scale?: "linear" | "mel";
    splitChannels?: boolean;
    windowFunc?: "bartlett" | "bartlettHann" | "blackman" | "cosine" | "gauss" | "hamming" | "hann" | "lanczoz" | "rectangular" | "triangular";
}

Type declaration

  • Optional alpha?: number

    Some window functions have this extra value. (Between 0 and 1)

  • Optional colorMap?: number[][] | "gray" | "igray" | "roseus"

    A 256 long array of 4-element arrays. Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha. Each entry should contain a float between 0 and 1 and specify r, g, b, and alpha.

  • Optional container?: string | HTMLElement

    Selector of element or element in which to render

  • Optional fftSamples?: number

    Number of samples to fetch to FFT. Must be a power of 2.

  • Optional frequencyMax?: number

    Max frequency to scale spectrogram. Set this to samplerate/2 to draw whole range of spectrogram.

  • Optional frequencyMin?: number

    Min frequency to scale spectrogram.

  • Optional gainDB?: number

    Increases / decreases the brightness of the display. For small signals where the display is mostly "blue" (dark) you can increase this value to see brighter colors and give more detail. If the display has too much "white", decrease this value. The default is 20dB and corresponds to a -20 dB signal at a particular frequency being displayed as "white".

  • Optional height?: number

    Height of the spectrogram view in CSS pixels

  • Optional labels?: boolean

    Set to true to display frequency labels.

  • Optional labelsBackground?: string
  • Optional labelsColor?: string
  • Optional labelsHzColor?: string
  • Optional noverlap?: number

    Size of the overlapping window. Must be < fftSamples. Auto deduced from canvas size by default.

  • Optional rangeDB?: number

    Affects the range of signal sizes that will be displayed as colors. The default is 80 dB and means that you will not see anything for signals 80 dB below the value set for "Gain".

  • Optional scale?: "linear" | "mel"

    Based on: https://manual.audacityteam.org/man/spectrogram_settings.html

    • Linear: Linear The linear vertical scale goes linearly from 0 kHz to 20 kHz frequency by default.
    • Mel: The name Mel comes from the word melody to indicate that the scale is based on pitch comparisons. This is the default scale.
  • Optional splitChannels?: boolean

    Render a spectrogram for each channel independently when true.

  • Optional windowFunc?: "bartlett" | "bartlettHann" | "blackman" | "cosine" | "gauss" | "hamming" | "hann" | "lanczoz" | "rectangular" | "triangular"

    The window function to be used.

Generated using TypeDoc