Skip to content
0.2.0-dev Download ZIP
35 lines ·1.9 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="AudioEffectSpectrumAnalyzerInstance" inherits="AudioEffectInstance" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Queryable instance of an [AudioEffectSpectrumAnalyzer].
5 </brief_description>
6 <description>
7 The runtime part of an [AudioEffectSpectrumAnalyzer], which can be used to query the magnitude of a frequency range on its host bus.
8 An instance of this class can be obtained with [method AudioServer.get_bus_effect_instance].
9 </description>
10 <tutorials>
11 <link title="Audio buses">$DOCS_URL/tutorials/audio/audio_buses.html</link>
12 <link title="Audio effects">$DOCS_URL/tutorials/audio/audio_effects.html</link>
13 <link title="Audio Spectrum Visualizer Demo">https://godotengine.org/asset-library/asset/2762</link>
14 </tutorials>
15 <methods>
16 <method name="get_magnitude_for_frequency_range" qualifiers="const">
17 <return type="Vector2" />
18 <param index="0" name="from_hz" type="float" />
19 <param index="1" name="to_hz" type="float" />
20 <param index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" />
21 <description>
22 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.
23 [param mode] determines how the frequency range will be processed.
24 </description>
25 </method>
26 </methods>
27 <constants>
28 <constant name="MAGNITUDE_AVERAGE" value="0" enum="MagnitudeMode">
29 Use the average value across the frequency range as magnitude.
30 </constant>
31 <constant name="MAGNITUDE_MAX" value="1" enum="MagnitudeMode">
32 Use the maximum value of the frequency range as magnitude.
33 </constant>
34 </constants>
35</class>