2019-04-15 14:49:41 +02:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-07-06 10:08:05 +02:00
<class name= "AudioEffectSpectrumAnalyzerInstance" inherits= "AudioEffectInstance" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2019-04-15 14:49:41 +02:00
<brief_description >
2024-04-23 01:41:38 +02:00
Queryable instance of an [AudioEffectSpectrumAnalyzer].
2019-04-15 14:49:41 +02:00
</brief_description>
<description >
2024-04-23 01:41:38 +02:00
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 acquired with [method AudioServer.get_bus_effect_instance].
2019-04-15 14:49:41 +02:00
</description>
<tutorials >
2024-04-23 01:41:38 +02:00
<link title= "Audio Spectrum Visualizer Demo" > https://godotengine.org/asset-library/asset/2762</link>
2019-04-15 14:49:41 +02:00
</tutorials>
<methods >
<method name= "get_magnitude_for_frequency_range" qualifiers= "const" >
2021-07-30 15:28:05 +02:00
<return type= "Vector2" />
2022-08-06 20:11:48 +02:00
<param index= "0" name= "from_hz" type= "float" />
<param index= "1" name= "to_hz" type= "float" />
<param index= "2" name= "mode" type= "int" enum= "AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default= "1" />
2019-04-15 14:49:41 +02:00
<description >
2024-04-23 01:41:38 +02:00
Returns the magnitude of the frequencies from [param from_hz] to [param to_hz] in linear energy as a Vector2. The [code]x[/code] component of the return value represents the left stereo channel, and [code]y[/code] represents the right channel.
[param mode] determines how the frequency range will be processed. See [enum MagnitudeMode].
2019-04-15 14:49:41 +02:00
</description>
</method>
</methods>
<constants >
<constant name= "MAGNITUDE_AVERAGE" value= "0" enum= "MagnitudeMode" >
2024-04-23 01:41:38 +02:00
Use the average value across the frequency range as magnitude.
2019-04-15 14:49:41 +02:00
</constant>
<constant name= "MAGNITUDE_MAX" value= "1" enum= "MagnitudeMode" >
2024-04-23 01:41:38 +02:00
Use the maximum value of the frequency range as magnitude.
2019-04-15 14:49:41 +02:00
</constant>
</constants>
</class>