Class Analyser
Properties
BARGRAPHAMPLITUDE
BARGRAPHAMPLITUDE: number = 256
Gets or sets the bar graph amplitude
DEBUGCANVASPOS
DEBUGCANVASPOS: { x: number; y: number } = ...
Gets or sets the position of the debug canvas
DEBUGCANVASSIZE
DEBUGCANVASSIZE: { height: number; width: number } = ...
Gets or sets the debug canvas size
FFT_ SIZE
FFT_SIZE: number = 512
Gets or sets the FFT table size
SMOOTHING
SMOOTHING: number = 0.75
Gets or sets the smoothing
Methods
connect Audio Nodes
-
Connects two audio nodes
Parameters
- inputAudioNode: AudioNode
defines first node to connect
- outputAudioNode: AudioNode
defines second node to connect
Returns void
- inputAudioNode: AudioNode
dispose
-
Releases all associated resources
Returns void
draw Debug Canvas
-
Renders the debug canvas
Returns void
get Byte Frequency Data
-
Gets the current frequency data as a byte array
Returns Uint8Array
a Uint8Array
get Byte Time Domain Data
-
Gets the current waveform as a byte array
Returns Uint8Array
a Uint8Array
get Float Frequency Data
-
Gets the current frequency data as a float array
Returns Float32Array
a Float32Array
get Frequency Bin Count
-
Get the number of data values you will have to play with for the visualization
Returns number
a number
stop Debug Canvas
-
Stops rendering the debug canvas and removes it
Returns void
Class used to work with sound analyzer using fast fourier transform (FFT)
See
https://doc.babylonjs.com/features/featuresDeepDive/audio/playingSoundsMusic