Options
All
  • Public
  • Public/Protected
  • All
Menu

WebAudioAnalyser is an AnalyserAdapter that supports audio tag sources

Hierarchy

Index

Constructors

constructor

Properties

Private analysers

analysers: [AnalyserNode, AnalyserNode]

Private beat

beat: boolean

Private channelSplit

channelSplit: ChannelSplitterNode

Private context

context: AudioContext

Private decay

decay: number

Private fftSize

fftSize: number

Private gain

gain: GainNode

Private movingThreshold

movingThreshold: number = 0

Private source

source: AudioNode

Private threshold

threshold: number

Private visData

Methods

connectToNode

  • connectToNode(sourceNode: AudioNode): void
  • Connect this analyser to any WebAudio Node

    Parameters

    • sourceNode: AudioNode

      node which will be used as audio source

    Returns void

getSpectrum

  • getSpectrum(channel?: Channels): Float32Array

getWaveform

  • getWaveform(channel?: Channels): Float32Array

isBeat

  • isBeat(): boolean

load

  • load(source: HTMLMediaElement | string, readyFunc: any): HTMLMediaElement
  • Helper for Webvs.WebAudioAnalyser#connectToNode. This creates Audio object for the audio file and connects this analyser to its mediaElementSource

    Parameters

    • source: HTMLMediaElement | string

      source for the audio. Use an audio tag element or a url

    • readyFunc: any

      a callback that'll be called when ready to play

    Returns HTMLMediaElement

update

  • update(): void