Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Analyser

Analyser which retrieves frequency/waveform data of the signal passing through it

Hierarchy

Index

Constructors

Other Properties

Settings Properties

Data Accessors

Other Accessors

Settings Accessors

Other Methods

Utility Methods

Constructors

constructor

Other Properties

Readonly input

input: AudioNode

Underlying WebAudio node used for input to the Euphony node

offSignal

offSignal: () => void

Callback function that executes when Analyser.signal turns from true to false

Type declaration

    • (): void
    • Callback function that executes when Analyser.signal turns from true to false

      Returns void

onSignal

onSignal: () => void

Callback function that executes when Analyser.signal turns from false to true

Type declaration

    • (): void
    • Callback function that executes when Analyser.signal turns from false to true

      Returns void

Readonly output

output: AudioNode

Underlying WebAudio node used for output from the Euphony node

Settings Properties

Protected _analyserNode

_analyserNode: AnalyserNode

Underlying analyser node for visualization data

Data Accessors

amplitude

  • get amplitude(): number

frequency

  • get frequency(): Float32Array
  • Computed frequency data with each item being the normalized decibel value from 0.0 to 1.0 for a specefic frequency. Where the range of the scale represents Analyser.minDecibels and Analyser.maxDecibels respectively. The frequencies are linearly spread from 0 to half of the sample rate which is determined by the audio device used for output and the length of the array is equal to the Analyser.frequencyBinCount.

    Note: Only updated on Analyser.updateFrequency call*

    category

    Data

    readonly

    Returns Float32Array

signal

  • get signal(): boolean

waveform

  • get waveform(): Float32Array
  • Computed waveform data with each item being the normalized decibel value from -1.0 to 1.0 for each sample on the time domain. The length of the array is equal to the Analyser.fftSize.

    Note: Only updated on Analyser.updateWaveform call*

    category

    Data

    readonly

    Returns Float32Array

Other Accessors

bands

  • get bands(): Float32Array
  • Frequency data by band intervals. Bands are divided up on a log-scale according to Analyser.numberOfBands.

    Takes the highest frequency in each band as the intensity for that band

    Returns Float32Array

numberOfBands

  • get numberOfBands(): number
  • set numberOfBands(count: number): void
  • Number of frequency bands to split the raw Analyser.frequency data into

    Returns number

  • Number of frequency bands to split the raw Analyser.frequency data into

    Parameters

    • count: number

    Returns void

Settings Accessors

fftSize

  • get fftSize(): number
  • set fftSize(value: number): void
  • Window size used by the Fast Fourier Transform (FFT) for analysis. Higher values increase the detail in the frequency data but decrease detail in the waveform data

    category

    Settings

    Returns number

  • Window size used by the Fast Fourier Transform (FFT) for analysis. Higher values increase the detail in the frequency data but decrease detail in the waveform data

    Parameters

    • value: number

    Returns void

frequencyBinCount

  • get frequencyBinCount(): number
  • Number of frequency bins used for the FFT. Equal to half of the Analyser.fftSize and represents the length of Analyser.frequency

    category

    Settings

    readonly

    Returns number

maxDecibels

  • get maxDecibels(): number
  • set maxDecibels(value: number): void
  • The maximum decibel value used for scaling FFT data. Any values equal to or higher than this are returned as 1

    category

    Settings

    Returns number

  • The maximum decibel value used for scaling FFT data. Any values equal to or higher than this are returned as 1

    Parameters

    • value: number

    Returns void

minDecibels

  • get minDecibels(): number
  • set minDecibels(value: number): void
  • The minimum decibel value used for scaling FFT data. Any values equal to or lower than this are returned as 0

    category

    Settings

    Returns number

  • The minimum decibel value used for scaling FFT data. Any values equal to or lower than this are returned as 0

    Parameters

    • value: number

    Returns void

smoothingTimeConstant

  • get smoothingTimeConstant(): number
  • set smoothingTimeConstant(value: number): void
  • Averaging constant used to smooth analysis data on a scale from 0.0 to 1.0, where 0 represents no averaging and 1 maximum averaging.

    category

    Settings

    Returns number

  • Averaging constant used to smooth analysis data on a scale from 0.0 to 1.0, where 0 represents no averaging and 1 maximum averaging.

    Parameters

    • value: number

    Returns void

threshold

  • get threshold(): number
  • set threshold(value: number): void

Other Methods

updateFrequency

  • updateFrequency(): void

updateWaveform

  • updateWaveform(): void

Utility Methods

connect

  • Function for connecting a Euphony node to another Euphony node or a WebAudio node

    Parameters

    • destination: EuphonyNode | AudioNode

      The destionation to connect to, either a Euphony node or base WebAudio node

    Returns void

Generated using TypeDoc