Tone.Analyser

↳ EXTENDS Tone

Wrapper around the native Web Audio’s AnalyserNode. Extracts FFT or Waveform data from the incoming signal.

CONSTRUCTOR

new Tone.Analyser ( [
type
] , [
size
] )
type

The return type of the analysis, either “fft”, or “waveform”.

type: String
optional
size

The size of the FFT. Value must be a power of two in the range 32 to 32768.

type: Number
optional

DEFAULTS

{
size : 1024 ,
returnType : byte ,
type : fft ,
smoothing : 0.8 ,
maxDecibels : -30 ,
minDecibels : -100
}

Members

.maxDecibels

↝ Decibels #

The largest decibel value which is analysed by the FFT.

</>

.minDecibels

↝ Decibels #

The smallest decibel value which is analysed by the FFT.

</>

.size

↝ Number #

The size of analysis. This must be a power of two in the range 32 to 32768.

</>

.smoothing

↝ NormalRange #

0 represents no time averaging with the last analysis frame.

</>

.type

↝ String #

The return type of Tone.Analyser.analyse(), either “byte” or “float”. When the type is set to “byte” the range of values returned in the array are between 0-255. “float” values are between [-1, 1] when the type is set to “waveform” and between [minDecibels,maxDecibels] when the type is “fft”.

</>

.type

↝ String #

The analysis function returned by Tone.Analyser.analyse(), either “fft” or “waveform”.

</>

Methods

.analyse ( )

#
↪ returns TypedArray

Run the analysis given the current settings and return the result as a TypedArray.

</>

.dispose ( )

#
↪ returns Tone.Analyser

this

Clean up.

</>
docs generated Sep 15 2019