AudioAnalyzer
Takes measurements from audio streams that are connected to it via one or more Wires.
Memory category | Internal |
---|
Member index 6
Description
AudioAnalyzer takes measurements from audio streams that are wired to it through Wire. It provides a single Input pin but does not produce any output streams.
History 15
- 652 Add WiringChanged
- 648 Change ReturnType of GetConnectedWires from Objects to Instances
- 643 Change Tags of AudioAnalyzer from [NotBrowsable] to []
- 637 Change ReturnType of GetConnectedWires from Array to Objects
- 637 Add SpectrumEnabled
- 618 Change Security of GetConnectedWires from PluginSecurity to None
- 607 Change Security of GetConnectedWires from RobloxScriptSecurity to PluginSecurity
- 597 Change MemoryCategory of AudioAnalyzer from Instances to Internal
- 593 Add GetConnectedWires
- 592 Change Category of RmsLevel from Data to Metering
- 592 Change Category of PeakLevel from Data to Metering
- 589 Add GetSpectrum
- 588 Add RmsLevel
- 588 Add PeakLevel
- 588 Add AudioAnalyzer
Members 6
GetConnectedWires
Parameters (1) | ||
---|---|---|
pin | string | |
Returns (1) | ||
Instances |
Returns an array of Wires that are connected to the specified pin. AudioAnalyzer has one "Input" pin.
Thread safety | Unsafe |
---|
History 5
- 648 Change ReturnType of GetConnectedWires from Objects to Instances
- 637 Change ReturnType of GetConnectedWires from Array to Objects
- 618 Change Security of GetConnectedWires from PluginSecurity to None
- 607 Change Security of GetConnectedWires from RobloxScriptSecurity to PluginSecurity
- 593 Add GetConnectedWires
GetSpectrum
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
Array |
Returns the frequency spectrum of the last audio buffer, as an array of numbers. The elements of the array are root-mean-square volume levels, evenly spaced from 0 hertz to 24,000 hertz. If any of the analyzer's inputs come from an AudioDeviceInput, this method returns an empty array.
Thread safety | Unsafe |
---|
History 1
- 589 Add GetSpectrum
PeakLevel
Type | Default | |
---|---|---|
float | 0 |
The loudest volume observed during the last audio buffer. This property changes often and thus does not fire changed events.
Thread safety | ReadSafe |
---|---|
Category | Metering |
Loaded/Saved | false/true |
RmsLevel
Type | Default | |
---|---|---|
float | 0 |
The root-mean-square average volume observed during the last audio buffer. This property is generally more stable than PeakLevel but it may not capture momentary volume spikes.
Thread safety | ReadSafe |
---|---|
Category | Metering |
Loaded/Saved | false/true |
SpectrumEnabled
Type | Default | |
---|---|---|
bool | true |
Enables usage of GetSpectrum(). If
false
, GetSpectrum() returns an empty
array, but the CPU overhead of the AudioAnalyzer is dramatically
reduced. This means that if you are only analyzing the volume of an
audio stream, you can disable this property to improve performance.
Thread safety | ReadSafe |
---|---|
Category | Metering |
Loaded/Saved | true |
History 1
- 637 Add SpectrumEnabled
WiringChanged
Parameters (4) | |
---|---|
connected | bool |
pin | string |
wire | Wire |
instance | Instance |
Event that fires after a Wire becomes connected or disconnected, and that Wire is now or was previously connected to a pin on the AudioAnalyzer and to some other wirable instance.
Thread safety | Unsafe |
---|
History 1
- 652 Add WiringChanged