Visualizer
Summary
Settings and controls for audio visualization mode
Class Properties
Name | Return Type | Description |
---|---|---|
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:DisableScripting()
Disables scripted access to the audio visualization buffer
Returns: nil
Example
Visualizer:SetWaveform(data)
Passes the given waveform data to the audio visualizer
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
data | number[] | An array of numbers representing the waveform |
Example
Visualizer:SetFft(data1, data2, data3, data4)
Passes the given FFT data to the audio visualizer
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
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:SetBeats(x, y, z, w)
Passes the given beat data to the audio visualizer
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
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:SetBeatAccumulators(x, y, z, w)
Passes the given beat accumulator data to the audio visualizer
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
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:SetBandPeak(peak)
Passes the given band peak data to the audio visualizer
Returns: nil
Parameters:
Name | Type | Default | Description |
---|---|---|---|
peak | number | The peak value |
Example
Last updated