Class reference

AudioEffectSpectrumAnalyzerInstance

Inherits AudioEffectInstance

Queryable instance of an AudioEffectSpectrumAnalyzer.

Description

The runtime part of an AudioEffectSpectrumAnalyzer, which can be used to query the magnitude of a frequency range on its host bus. An instance of this class can be obtained with AudioServer.get_bus_effect_instance().

Methods

Vector2 get_magnitude_for_frequency_range(float from_hz, float to_hz, int mode = 1) const

Returns the magnitude of the frequencies from from_hz to to_hz in linear energy as a Vector2. The x component of the return value represents the left stereo channel, and y represents the right channel. mode determines how the frequency range will be processed.

Constants

MAGNITUDE_AVERAGE = 0

Enum: MagnitudeMode

Use the average value across the frequency range as magnitude.

MAGNITUDE_MAX = 1

Enum: MagnitudeMode

Use the maximum value of the frequency range as magnitude.

Tutorials

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.