Visualizer

Summary

Settings and controls for audio visualization mode

Class Properties

NameReturn TypeDescription

sampleRate

number Read-only

The current audio sample rate

duration

number Read-only

The current duration of the audio buffer

Class Methods

Visualizer:EnableScripting()

Enables scripted access to the audio visualization buffer

Returns: nil

Example

Visualizer.EnableScripting()

Visualizer:DisableScripting()

Disables scripted access to the audio visualization buffer

Returns: nil

Example

Visualizer.DisableScripting()

Visualizer:SetWaveform(data)

Passes the given waveform data to the audio visualizer

Returns: nil

Parameters:

NameTypeDefaultDescription

data

number[]

An array of numbers representing the waveform

Example

Visualizer.SetWaveform(data)

Visualizer:SetFft(data1, data2, data3, data4)

Passes the given FFT data to the audio visualizer

Returns: nil

Parameters:

NameTypeDefaultDescription

data1

number[]

An array of numbers representing first FFT band

data2

number[]

An array of numbers representing second FFT band

data3

number[]

An array of numbers representing third FFT band

data4

number[]

An array of numbers representing fourth FFT band

Example

Visualizer.SetFft(data1, data2, data3, data4)

Visualizer:SetBeats(x, y, z, w)

Passes the given beat data to the audio visualizer

Returns: nil

Parameters:

NameTypeDefaultDescription

x

number

The first beat value

y

number

The second beat value

z

number

The third beat value

w

number

The fourth beat value

Example

Visualizer.SetBeats(x, y, z, w)

Visualizer:SetBeatAccumulators(x, y, z, w)

Passes the given beat accumulator data to the audio visualizer

Returns: nil

Parameters:

NameTypeDefaultDescription

x

number

The first beat accumulator value

y

number

The second beat accumulator value

z

number

The third beat accumulator value

w

number

The fourth beat accumulator value

Example

Visualizer.SetBeatAccumulators(x, y, z, w)

Visualizer:SetBandPeak(peak)

Passes the given band peak data to the audio visualizer

Returns: nil

Parameters:

NameTypeDefaultDescription

peak

number

The peak value

Example

Visualizer.SetBandPeak(0.5)

Last updated