DSP Effect API#
FmodDSP#
Inherits: RefCounted
Low-level wrapper around FMOD::DSP for signal processing and effect chains
Description#
FmodDSP represents FMOD DSP. can FMOD effect, can FmodAudioEffect creates and to bus or ChannelControl DSP. through can controls DSP state, bypass state, parameter, input output connection, callback.
Properties#
Methods#
Connection routing.#
FmodDSPConnection add_input(target_dsp: FmodDSP, type: FmodDSPConnectionType = DSPCONNECTION_TYPE_STANDARD)#
target_dsp as input connection to current DSP, and returns connection object.
Dictionary get_input(index: int) const#
Returns information for the specified input connection, usually including the input DSP and connection object.
Dictionary get_output(index: int) const#
Returns information for the specified output connection, usually including the output DSP and connection object.
int get_num_inputs() const#
Returns input connection.
int get_num_outputs() const#
Returns output connection.
void disconnect_from(target: FmodDSP, connection: FmodDSPConnection = null)#
Disconnects to specified DSP connection. connection object when connection.
void disconnect_all(inputs: bool, outputs: bool)#
Input and / or output connection.
Channel Format and Metering#
void set_channel_format(numchannels: int, speakermode: int)#
Sets the DSP output channel count and speaker mode.
Dictionary get_channel_format() const#
Returns DSP current channel.
Dictionary get_output_channel_format(inchannels: int, inspeakermode: int) const#
Input channel queries DSP output channel.
void set_metering_enabled(input_enabled: bool, output_enabled: bool)#
Or DSP input / output.
Dictionary get_metering_enabled() const#
Returns input and output.
Dictionary get_metering_info() const#
Returns suitable for volume or.
Parameter controls.#
int get_num_parameters() const#
Returns DSP parameter.
Dictionary get_parameter_info(index: int) const#
Returns information for the specified parameter, including name, label, description, type, range, and default value.
int get_data_parameter_index(data_type: FmodDSPParameterDataType) const#
FMOD parameter parameter index.
Methods |
Description |
|---|---|
|
Sets or gets parameter. |
|
Sets or gets parameter. |
|
Sets or gets parameter. |
|
Sets or gets parameter. |
State and Information#
void set_active(active: bool)#
Sets DSP state.
bool get_active() const#
Returns DSP.
void set_bypass(bypass: bool)#
Sets DSP bypass state.
bool get_bypass() const#
Returns DSP bypass.
void set_wet_dry_mix(prewet: float, postwet: float, dry: float)#
Sets DSP /.
Dictionary get_wet_dry_mix() const#
Returns / sets.
bool get_idle() const#
Returns true if the DSP is currently idle.
void reset()#
DSP internal state.
void release()#
Releases underlying DSP.
FmodDSPType get_type() const#
Returns DSP.
Dictionary get_info() const#
Returns DSP overview information, usually including name, version, channel count, and configuration width.
Dictionary get_cpu_usage() const#
Returns DSP CPU.
FmodSystem get_system_object() const#
Returns creates or DSP FMOD object.
Callback.#
Custom DSP units can receive FMOD lifecycle, processing, and parameter access callbacks through Callables. Each callback has matching set_*_callback(callback) and get_*_callback() methods.
Callback. |
Methods |
Description |
|---|---|---|
Lifecycle. |
|
DSP creates, releases and when. |
Processing |
|
Audio read, block processing, processing state, and playback position changes. |
Parameter sets. |
|
DSP parameter when. |
Parameter. |
|
DSP parameter when. |
Enumerations#
FmodDSPType#
Member |
Value |
Description |
|---|---|---|
DSP_TYPE_UNKNOWN |
0 |
Through FMOD creates. |
DSP_TYPE_MIXER |
1 |
Used for input. |
DSP_TYPE_OSCILLATOR |
2 |
Oscillator that can generate sine, square, saw, triangle, or noise waveforms. |
DSP_TYPE_LOWPASS |
3 |
Resonant low-pass filter, deprecated. |
DSP_TYPE_ITLOWPASS |
4 |
Impulse Tracker filter. |
DSP_TYPE_HIGHPASS |
5 |
Resonant high-pass filter, deprecated. |
DSP_TYPE_ECHO |
6 |
Effect. |
DSP_TYPE_FADER |
7 |
Volume and controls. |
DSP_TYPE_FLANGE |
8 |
Effect. |
DSP_TYPE_DISTORTION |
9 |
Distortion effect. |
DSP_TYPE_NORMALIZE |
10 |
Or sound to specified. |
DSP_TYPE_LIMITER |
11 |
Sound. |
DSP_TYPE_PARAMEQ |
12 |
Parametric equalizer, deprecated. |
DSP_TYPE_PITCHSHIFT |
13 |
In velocity pitch. |
DSP_TYPE_CHORUS |
14 |
Effect. |
DSP_TYPE_ITECHO |
15 |
Impulse Tracker. |
DSP_TYPE_COMPRESSOR |
16 |
Compression. |
DSP_TYPE_SFXREVERB |
17 |
SFX reverb effect. |
DSP_TYPE_LOWPASS_SIMPLE |
18 |
Filter. |
DSP_TYPE_DELAY |
19 |
Channel delay effect. |
DSP_TYPE_TREMOLO |
20 |
Effect. |
DSP_TYPE_SEND |
21 |
To returns DSP. |
DSP_TYPE_RETURN |
22 |
Receives signals from multiple send DSP units. |
DSP_TYPE_HIGHPASS_SIMPLE |
23 |
Filter. |
DSP_TYPE_PAN |
24 |
2D / 3D and channel. |
DSP_TYPE_THREE_EQ |
25 |
Three-band equalizer |
DSP_TYPE_FFT |
26 |
FFT spectrum analysis. |
DSP_TYPE_LOUDNESS_METER |
27 |
Loudness and true peak analysis. |
DSP_TYPE_CONVOLUTIONREVERB |
28 |
Reverb. |
DSP_TYPE_CHANNELMIX |
29 |
Channel Gain, Grouping, and Speaker Format Conversion |
DSP_TYPE_TRANSCEIVER |
30 |
Global slot-based send and receive. |
DSP_TYPE_OBJECTPAN |
31 |
Object spatialization. |
DSP_TYPE_MULTIBAND_EQ |
32 |
Parameter. |
DSP_TYPE_MULTIBAND_DYNAMICS |
33 |
Multiband dynamics processor, deprecated. |
DSP_TYPE_MAX |
34 |
DSP type boundary value. |
DSP_TYPE_FORCEINT |
65536 |
Forces the enum to be stored as an integer-sized value. |
FmodDSPParameterDataType#
Member |
Value |
Description |
|---|---|---|
DSP_PARAMETER_DATA_TYPE_USER |
0 |
User Data |
DSP_PARAMETER_DATA_TYPE_OVERALLGAIN |
-1 |
Overall gain |
DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES |
-2 |
Single 3D attributes structure. |
DSP_PARAMETER_DATA_TYPE_SIDECHAIN |
-3 |
Sidechain data |
DSP_PARAMETER_DATA_TYPE_FFT |
-4 |
FFT. |
DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI |
-5 |
Multiple 3D attributes structures. |
DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE |
-6 |
Attenuation range. |
DSP_PARAMETER_DATA_TYPE_DYNAMIC_RESPONSE |
-7 |
Dynamic Response |
DSP_PARAMETER_DATA_TYPE_FINITE_LENGTH |
-8 |
Finite-length information |
FmodDSPConnection#
Inherits: RefCounted
DSP node connection object.
Description#
FmodDSPConnection represents a connection between two FmodDSP units. It can adjust the connection mix level and mix matrix, and query the input and output DSP units.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
mix |
0.0 |
Connection, unit as. |
Methods#
void set_mix(volume_db: float)#
Sets connection.
float get_mix() const#
Returns connection.
void set_mix_matrix(matrix: PackedFloat32Array, outchannels: int, inchannels: int, inchannel_hop: int)#
Sets the connection mix matrix used to customize input-channel to output-channel mapping.
PackedFloat32Array get_mix_matrix(outchannels: int, inchannels: int, inchannel_hop: int) const#
Returns connection mix matrix.
FmodDSP get_input() const#
Returns connection input DSP.
FmodDSP get_output() const#
Returns connection output DSP.
FmodDSPConnectionType get_type() const#
Returns connection.
Enumerations#
FmodDSPConnectionType#
Member |
Value |
Description |
|---|---|---|
DSPCONNECTION_TYPE_STANDARD |
0 |
DSP connection. |
DSPCONNECTION_TYPE_SIDECHAIN |
1 |
Connection. |
DSPCONNECTION_TYPE_SEND |
2 |
Connection. |
DSPCONNECTION_TYPE_SEND_SIDECHAIN |
3 |
Connection. |
FmodAudioEffect#
Inherits: Resource
can to FmodAudioBus audio effect.
Description#
FmodAudioEffect FMOD audio effect. effect creates DSP to FmodChannelGroup, and current bus and DSP.
Methods#
void apply_to(bus: FmodChannelGroup)#
Effect to specified channel group.
void remove_from_bus(bus: FmodChannelGroup)#
Specified channel group removes effect.
FmodChannelGroup get_bus() const#
Returns current to channel group.
FmodAudioEffectAmplify#
Simple gain effect for amplifying or attenuating a signal.
Description#
FmodAudioEffectAmplify will in bus effect chain creates DSP. suitable for bus volume, when or attenuation, can in when volume_db or volume_linear controls.
Properties#
Methods#
void set_volume_db(volume_db: float)#
Sets .
float get_volume_db() const#
Returns .
void set_volume_linear(volume_linear: float)#
Sets .
float get_volume_linear() const#
Returns .
FmodAudioEffectFilter#
Filter effect for shaping frequency response with cutoff frequency, slope, gain, and resonance.
Description#
FmodAudioEffectFilter provides basic filtering controls. Use cutoff_hz to set the cutoff frequency, db to choose the cutoff slope, and gain plus resonance to adjust the filtered signal level and resonance. It is suitable for low-pass, high-pass, occlusion, distance, and menu transition effects.
Properties#
Methods#
void set_cutoff_hz(cutoff_hz: float)#
Sets .
float get_cutoff_hz() const#
Returns .
void set_db(db: FilterDB)#
Sets filter.
FilterDB get_db() const#
Returns filter.
void set_gain(gain: float)#
Sets .
float get_gain() const#
Returns .
void set_resonance(resonance: float)#
Sets .
float get_resonance() const#
Returns .
Enumerations#
FilterDB#
Member |
Value |
Description |
|---|---|---|
FILTER_6DB |
0 |
6 dB. |
FILTER_12DB |
1 |
12 dB. |
FILTER_18DB |
2 |
18 dB. |
FILTER_24DB |
3 |
24 dB. |
FmodAudioEffectEQ#
Base class for multiband equalizers, using FMOD MULTIBAND_EQ DSP units to form 6-, 10-, or 21-band EQ.
Description#
FmodAudioEffectEQ builds a multiband equalizer from one or more FMOD MULTIBAND_EQ DSP units. It can create 6, 10, or 21 bands from presets, and each band can adjust gain, center frequency, Q value, and filter type.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
preset |
PRESET_6_BANDS |
Equalizer band preset |
|
Band_0_gain to band_n_gain. |
0.0 |
Gain for the corresponding band, in decibels. |
|
Band_0_frequency to band_n_frequency. |
Determined by preset |
Center frequency for the corresponding band, in Hz. |
|
Band_0_q to band_n_q. |
0.707 |
Q value for the corresponding band. |
|
Band_0_filter_type to band_n_filter_type. |
FILTER_PEAKING |
Filter type for the corresponding band. |
Methods#
void set_preset(preset: Preset)#
Sets the equalizer band preset and rebuilds the band list.
Preset get_preset() const#
Returns current.
int get_band_count() const#
Returns current.
void set_band_gain_db(band_idx: int, gain_db: float)#
Sets the gain of the specified band, in decibels.
float get_band_gain_db(band_idx: int) const#
Returns the gain of the specified band, in decibels.
void set_band_frequency(band_idx: int, frequency: float)#
Sets the center frequency of the specified band.
float get_band_frequency(band_idx: int) const#
Returns the center frequency of the specified band.
void set_band_filter_type(band_idx: int, filter_type: FilterType)#
Sets the filter type of the specified band.
FilterType get_band_filter_type(band_idx: int) const#
Returns the filter type of the specified band.
void set_band_q(band_idx: int, q: float)#
Sets the Q value of the specified band.
float get_band_q(band_idx: int) const#
Returns the Q value of the specified band.
Enumerations#
Preset#
Member |
Value |
Description |
|---|---|---|
PRESET_6_BANDS |
0 |
6-band equalizer |
PRESET_10_BANDS |
1 |
10-band equalizer |
PRESET_21_BANDS |
2 |
21-band equalizer |
FilterType#
Member |
Value |
Description |
|---|---|---|
FILTER_DISABLED |
0 |
Disable this band |
FILTER_LOWPASS_12DB |
1 |
12 dB. |
FILTER_LOWPASS_24DB |
2 |
24 dB. |
FILTER_LOWPASS_48DB |
3 |
48 dB. |
FILTER_HIGHPASS_12DB |
4 |
12 dB. |
FILTER_HIGHPASS_24DB |
5 |
24 dB. |
FILTER_HIGHPASS_48DB |
6 |
48 dB. |
FILTER_LOWSHELF |
7 |
Low shelf |
FILTER_HIGHSHELF |
8 |
High shelf |
FILTER_PEAKING |
9 |
Filtering. |
FILTER_BANDPASS |
10 |
Filtering. |
FILTER_NOTCH |
11 |
Filtering. |
FILTER_ALLPASS |
12 |
Filtering. |
FILTER_LOWPASS_6DB |
13 |
6 dB. |
FILTER_HIGHPASS_6DB |
14 |
6 dB. |
FmodAudioEffectEQ6#
6-band equalizer preset.
Description#
FmodAudioEffectEQ6 is the 6-band preset version of FmodAudioEffectEQ. Its default bands are 32, 100, 320, 1000, 3200, and 10000 Hz. It inherits all properties and methods from FmodAudioEffectEQ.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
Band_0_gain to band_n_gain. |
0.0 |
Gain for the corresponding band, in decibels. |
|
Band_0_frequency to band_n_frequency. |
Determined by preset |
Center frequency for the corresponding band, in Hz. |
|
Band_0_q to band_n_q. |
0.707 |
Q value for the corresponding band. |
|
Band_0_filter_type to band_n_filter_type. |
FILTER_PEAKING |
Filter type for the corresponding band. |
Methods#
void set_preset(preset: Preset)#
Sets the equalizer band preset and rebuilds the band list.
Preset get_preset() const#
Returns current.
int get_band_count() const#
Returns current.
void set_band_gain_db(band_idx: int, gain_db: float)#
Sets the gain of the specified band, in decibels.
float get_band_gain_db(band_idx: int) const#
Returns the gain of the specified band, in decibels.
void set_band_frequency(band_idx: int, frequency: float)#
Sets the center frequency of the specified band.
float get_band_frequency(band_idx: int) const#
Returns the center frequency of the specified band.
void set_band_filter_type(band_idx: int, filter_type: FilterType)#
Sets the filter type of the specified band.
FilterType get_band_filter_type(band_idx: int) const#
Returns the filter type of the specified band.
void set_band_q(band_idx: int, q: float)#
Sets the Q value of the specified band.
float get_band_q(band_idx: int) const#
Returns the Q value of the specified band.
FmodAudioEffectEQ10#
10-band equalizer preset.
Description#
FmodAudioEffectEQ10 is the 10-band preset version of FmodAudioEffectEQ. Its default bands are 31.25, 62.5, 125, 250, 500, 1000, 2000, 4000, 8000, and 16000 Hz. It inherits all properties and methods from FmodAudioEffectEQ.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
Band_0_gain to band_n_gain. |
0.0 |
Gain for the corresponding band, in decibels. |
|
Band_0_frequency to band_n_frequency. |
Determined by preset |
Center frequency for the corresponding band, in Hz. |
|
Band_0_q to band_n_q. |
0.707 |
Q value for the corresponding band. |
|
Band_0_filter_type to band_n_filter_type. |
FILTER_PEAKING |
Filter type for the corresponding band. |
Methods#
void set_preset(preset: Preset)#
Sets the equalizer band preset and rebuilds the band list.
Preset get_preset() const#
Returns current.
int get_band_count() const#
Returns current.
void set_band_gain_db(band_idx: int, gain_db: float)#
Sets the gain of the specified band, in decibels.
float get_band_gain_db(band_idx: int) const#
Returns the gain of the specified band, in decibels.
void set_band_frequency(band_idx: int, frequency: float)#
Sets the center frequency of the specified band.
float get_band_frequency(band_idx: int) const#
Returns the center frequency of the specified band.
void set_band_filter_type(band_idx: int, filter_type: FilterType)#
Sets the filter type of the specified band.
FilterType get_band_filter_type(band_idx: int) const#
Returns the filter type of the specified band.
void set_band_q(band_idx: int, q: float)#
Sets the Q value of the specified band.
float get_band_q(band_idx: int) const#
Returns the Q value of the specified band.
FmodAudioEffectEQ21#
21-band equalizer preset.
Description#
FmodAudioEffectEQ21 is the 21-band preset version of FmodAudioEffectEQ. Its default bands range from 22 Hz to 22000 Hz. It inherits all properties and methods from FmodAudioEffectEQ.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
Band_0_gain to band_n_gain. |
0.0 |
Gain for the corresponding band, in decibels. |
|
Band_0_frequency to band_n_frequency. |
Determined by preset |
Center frequency for the corresponding band, in Hz. |
|
Band_0_q to band_n_q. |
0.707 |
Q value for the corresponding band. |
|
Band_0_filter_type to band_n_filter_type. |
FILTER_PEAKING |
Filter type for the corresponding band. |
Methods#
void set_preset(preset: Preset)#
Sets the equalizer band preset and rebuilds the band list.
Preset get_preset() const#
Returns current.
int get_band_count() const#
Returns current.
void set_band_gain_db(band_idx: int, gain_db: float)#
Sets the gain of the specified band, in decibels.
float get_band_gain_db(band_idx: int) const#
Returns the gain of the specified band, in decibels.
void set_band_frequency(band_idx: int, frequency: float)#
Sets the center frequency of the specified band.
float get_band_frequency(band_idx: int) const#
Returns the center frequency of the specified band.
void set_band_filter_type(band_idx: int, filter_type: FilterType)#
Sets the filter type of the specified band.
FilterType get_band_filter_type(band_idx: int) const#
Returns the filter type of the specified band.
void set_band_q(band_idx: int, q: float)#
Sets the Q value of the specified band.
float get_band_q(band_idx: int) const#
Returns the Q value of the specified band.
FmodAudioEffectDelay#
Dual-tap delay and feedback delay effect.
Description#
FmodAudioEffectDelay provides two independent taps and an optional feedback loop. Each tap can set delay time, level, and pan, while the feedback loop can set delay, level, and low-pass cutoff frequency.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
dry |
1.0 |
Original signal level |
|
tap1_active |
true |
Delay Tap. |
|
tap1_delay_ms |
250.0 |
Tap delay when. |
|
tap1_level_db |
-6.0 |
Level of the first tap. |
|
tap1_pan |
0.2 |
Pan of the first tap. |
|
tap2_active |
true |
Delay Tap. |
|
tap2_delay_ms |
500.0 |
Tap delay when. |
|
tap2_level_db |
-12.0 |
Level of the second tap. |
|
tap2_pan |
-0.4 |
Pan of the second tap. |
|
feedback_active |
false |
Delay. |
|
feedback_delay_ms |
340.0 |
Delay when. |
|
feedback_level_db |
-6.0 |
Feedback level |
|
feedback_lowpass |
16000.0 |
Feedback low-pass cutoff frequency |
Methods#
void set_dry(dry: float)#
Sets .
float get_dry()#
Returns .
void set_tap1_active(active: bool)#
Or Tap.
bool is_tap1_active() const#
Returns Tap.
void set_tap1_delay_ms(delay_ms: float)#
Sets Tap delay when.
float get_tap1_delay_ms() const#
Returns Tap delay when.
void set_tap1_level_db(level_db: float)#
Sets Tap.
float get_tap1_level_db() const#
Returns Tap.
void set_tap1_pan(pan: float)#
Sets Tap.
float get_tap1_pan() const#
Returns Tap.
void set_tap2_active(active: bool)#
Or Tap.
bool is_tap2_active() const#
Returns Tap.
void set_tap2_delay_ms(delay_ms: float)#
Sets Tap delay when.
float get_tap2_delay_ms() const#
Returns Tap delay when.
void set_tap2_level_db(level_db: float)#
Sets Tap.
float get_tap2_level_db() const#
Returns Tap.
void set_tap2_pan(pan: float)#
Sets Tap.
float get_tap2_pan() const#
Returns Tap.
void set_feedback_active(active: bool)#
Or delay.
bool is_feedback_active() const#
Returns delay.
void set_feedback_delay_ms(delay_ms: float)#
Sets delay when.
float get_feedback_delay_ms() const#
Returns delay when.
void set_feedback_level_db(level_db: float)#
Sets .
float get_feedback_level_db() const#
Returns .
void set_feedback_lowpass(lowpass: float)#
Sets .
float get_feedback_lowpass() const#
Returns .
FmodAudioEffectChorus#
Chorus effect with per-voice delay, rate, depth, level, cutoff frequency, and pan controls.
Description#
FmodAudioEffectChorus layers several slightly delayed and modulated voices to create a chorus sound. You can control the overall dry/wet mix and adjust delay, modulation rate, depth, level, cutoff frequency, and pan for each voice.
Properties#
Methods#
void set_voice_count(voices: int)#
Sets voice.
int get_voice_count() const#
Returns voice.
void set_wet(amount: float)#
Sets effect.
float get_wet() const#
Returns effect.
void set_dry(amount: float)#
Sets .
float get_dry() const#
Returns .
void set_voice_delay_ms(voice: int, delay_ms: float)#
Sets the delay time of the specified voice.
float get_voice_delay_ms(voice: int) const#
Returns the delay time of the specified voice.
void set_voice_rate_hz(voice: int, rate_hz: float)#
Sets the modulation rate of the specified voice.
float get_voice_rate_hz(voice: int) const#
Returns the modulation rate of the specified voice.
void set_voice_depth_ms(voice: int, depth_ms: float)#
Sets the modulation depth of the specified voice.
float get_voice_depth_ms(voice: int) const#
Returns the modulation depth of the specified voice.
void set_voice_level_db(voice: int, level_db: float)#
Sets the level of the specified voice.
float get_voice_level_db(voice: int) const#
Returns the level of the specified voice.
void set_voice_cutoff_hz(voice: int, cutoff_hz: float)#
Sets the cutoff frequency of the specified voice.
float get_voice_cutoff_hz(voice: int) const#
Returns the cutoff frequency of the specified voice.
void set_voice_pan(voice: int, pan: float)#
Sets the pan of the specified voice.
float get_voice_pan(voice: int) const#
Returns the pan of the specified voice.
FmodAudioEffectDistortion#
Distortion effect supporting clipping, arctangent distortion, lo-fi, overdrive, waveshaping, and bit crushing.
Description#
FmodAudioEffectDistortion creates a custom distortion DSP in the effect chain. Use mode to switch distortion algorithms, with controls for pre-gain, drive, post-gain, high-frequency preservation, and oversampling.
Properties#
Methods#
void set_mode(mode: Mode)#
Sets distortion.
Mode get_mode() const#
Returns distortion.
void set_pre_gain(gain: float)#
Sets before.
float get_pre_gain() const#
Returns before.
void set_drive(drive: float)#
Sets .
float get_drive() const#
Returns .
void set_post_gain(gain: float)#
Sets after.
float get_post_gain() const#
Returns after.
void set_keep_hf_hz(hz: float)#
Sets .
float get_keep_hf_hz() const#
Returns .
void set_oversample(oversample: int)#
Sets .
int get_oversample() const#
Returns .
Enumerations#
Mode#
Member |
Value |
Description |
|---|---|---|
MODE_CLIP |
0 |
Hard clipping |
MODE_ATAN |
1 |
Arctangent soft clipping |
MODE_LOFI |
2 |
Distortion. |
MODE_OVERDRIVE |
3 |
Distortion. |
MODE_WAVESHAPE |
4 |
Waveshaping |
MODE_BITCRUSH |
5 |
Bit crushing |
FmodAudioEffectPhaser#
Phaser effect.
Description#
FmodAudioEffectPhaser through, or. range_min_hz and range_max_hz controls range, rate_hz controls velocity, depth and feedback controls effect.
Properties#
Methods#
void set_depth(depth: float)#
Sets .
float get_depth() const#
Returns .
void set_feedback(feedback: float)#
Sets .
float get_feedback() const#
Returns .
void set_range_max_hz(range_max_hz: float)#
Sets range.
float get_range_max_hz() const#
Returns range.
void set_range_min_hz(range_min_hz: float)#
Sets range.
float get_range_min_hz() const#
Returns range.
void set_rate_hz(rate_hz: float)#
Sets .
float get_rate_hz() const#
Returns .
FmodAudioEffectPitchShift#
Pitch shifting effect.
Description#
FmodAudioEffectPitchShift FFT pitch. pitch_scale controls pitch, fft_size and oversampling will sound, delay and CPU.
Properties#
Methods#
void set_pitch_scale(pitch_scale: float)#
Sets pitch.
float get_pitch_scale() const#
Returns pitch.
void set_fft_size(fft_size: FFTSize)#
Sets FFT.
FFTSize get_fft_size() const#
Returns FFT.
void set_oversampling(oversampling: int)#
Sets .
int get_oversampling() const#
Returns .
Enumerations#
FFTSize#
Member |
Value |
Description |
|---|---|---|
FFT_SIZE_256 |
0 |
256 FFT. |
FFT_SIZE_512 |
1 |
512 FFT. |
FFT_SIZE_1024 |
2 |
1024 FFT. |
FFT_SIZE_2048 |
3 |
2048 FFT. |
FFT_SIZE_4096 |
4 |
4096 FFT. |
FFT_SIZE_MAX |
5 |
Boundary value |
FmodAudioEffectCompressor#
Dynamic compressor.
Description#
FmodAudioEffectCompressor reduces the dynamic range above the threshold and can compensate loudness with output gain. threshold_db sets where compression begins, ratio sets compression strength, attack_us and release_ms control response speed, and mix can be used for parallel compression.
Properties#
Methods#
void set_threshold(threshold_db: float)#
Sets compression.
float get_threshold() const#
Returns compression.
void set_ratio(ratio: float)#
Sets compression.
float get_ratio() const#
Returns compression.
void set_gain(gain_db: float)#
Sets output.
float get_gain() const#
Returns output.
void set_attack_us(attack_us: float)#
Sets when.
float get_attack_us() const#
Returns when.
void set_release_ms(release_ms: float)#
Sets releases when.
float get_release_ms() const#
Returns releases when.
void set_mix(mix: float)#
Sets .
float get_mix() const#
Returns .
void set_sidechain(sidechain: StringName)#
Sets bus.
StringName get_sidechain() const#
Returns the sidechain bus name.
FmodAudioEffectHardLimiter#
Hard limiter for limiting peak level.
Description#
FmodAudioEffectHardLimiter prevents signal peaks from exceeding the specified ceiling. It is often placed near the end of a bus effect chain to protect output, suppress sudden peaks, or provide a simple safety limit for a bus.
Properties#
Methods#
void set_ceiling_db(ceiling_db: float)#
Sets output.
float get_ceiling_db() const#
Returns output.
void set_pre_gain_db(pre_gain_db: float)#
Sets before.
float get_pre_gain_db() const#
Returns before.
void set_release(release: float)#
Sets releases when.
float get_release() const#
Returns releases when.
FmodAudioEffectPanner#
Left/right panning control.
Description#
FmodAudioEffectPanner provides. pan as when, as when, suitable for 2D UI sound, spatialization or bus.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
pan |
0.0 |
Pan position. Negative values pan left; positive values pan right. |
Methods#
void set_pan(pan: float)#
Sets position.
float get_pan() const#
Returns position.
FmodAudioEffectReverb#
Bus reverb effect with parameters similar to Godot’s AudioEffectReverb.
Description#
FmodAudioEffectReverb is a bus reverb effect with parameters similar to Godot’s AudioEffectReverb. It shapes space with room size, damping, predelay, diffusion, and dry/wet mix, making it suitable for applying shared ambience to a group of sounds.
Properties#
Methods#
void set_damping(damping: float)#
Sets .
float get_damping() const#
Returns .
void set_dry(dry: float)#
Sets .
float get_dry() const#
Returns .
void set_hpf(hpf: float)#
Sets filtering.
float get_hpf() const#
Returns filtering.
void set_predelay_feedback(predelay_feedback: float)#
Sets delay.
float get_predelay_feedback() const#
Returns delay.
void set_predelay_msec(predelay_msec: float)#
Sets delay when.
float get_predelay_msec() const#
Returns delay when.
void set_room_size(room_size: float)#
Sets .
float get_room_size() const#
Returns .
void set_spread(spread: float)#
Sets .
float get_spread() const#
Returns .
void set_wet(wet: float)#
Sets reverb.
float get_wet() const#
Returns reverb.
FmodAudioEffectStereoEnhance#
Stereo enhancement effect.
Description#
FmodAudioEffectStereoEnhance used for or. pan_pullout, time_pullout_ms when, surround controls.
Properties#
Methods#
void set_pan_pullout(amount: float)#
Sets .
float get_pan_pullout() const#
Returns .
void set_time_pullout(amount: float)#
Sets when.
float get_time_pullout() const#
Returns when.
void set_surround(amount: float)#
Sets .
float get_surround() const#
Returns .
FmodAudioEffectSpectrumAnalyzer#
Spectrum analyzer that can read band magnitudes, RMS, and spectral centroid.
Description#
FmodAudioEffectSpectrumAnalyzer inserts an FFT DSP into the bus effect chain and reads spectrum data from it. It does not alter the sound by itself, and is mainly useful for visualization, beat or energy detection, band-driven UI, and mix debugging.
Properties#
Methods#
void set_buffer_length(buffer_length: float)#
Sets .
float get_buffer_length() const#
Returns .
void set_fft_size(fft_size: FFTSize)#
Sets FFT.
FFTSize get_fft_size() const#
Returns FFT.
void update_spectrum()#
Actively refreshes spectrum data.
int get_bin_count() const#
Returns current bin.
float get_rms() const#
Returns current RMS.
float get_centroid() const#
Returns current.
Vector2 get_magnitude_for_frequency_range(begin: float, end: float, mode: MagnitudeMode = MAGNITUDE_MAX) const#
Returns the left and right channel magnitudes within the specified frequency range.
Enumerations#
FFTSize#
Member |
Value |
Description |
|---|---|---|
FFT_SIZE_256 |
0 |
256 FFT. |
FFT_SIZE_512 |
1 |
512 FFT. |
FFT_SIZE_1024 |
2 |
1024 FFT. |
FFT_SIZE_2048 |
3 |
2048 FFT. |
FFT_SIZE_4096 |
4 |
4096 FFT. |
FFT_SIZE_MAX |
5 |
Boundary value |
MagnitudeMode#
Member |
Value |
Description |
|---|---|---|
MAGNITUDE_AVERAGE |
0 |
Returns range. |
MAGNITUDE_MAX |
1 |
Returns range. |
Example#
@onready var bus := FmodServer.get_bus("Master")
var analyzer := FmodAudioEffectSpectrumAnalyzer.new()
func _ready():
analyzer.fft_size = FmodAudioEffectSpectrumAnalyzer.FFT_SIZE_2048
analyzer.buffer_length = 1.0
bus.add_effect(analyzer)
func _process(_delta):
analyzer.update_spectrum()
var low := analyzer.get_magnitude_for_frequency_range(20.0, 250.0, FmodAudioEffectSpectrumAnalyzer.MAGNITUDE_AVERAGE)
var mid := analyzer.get_magnitude_for_frequency_range(250.0, 4000.0)
var high := analyzer.get_magnitude_for_frequency_range(4000.0, 16000.0)
print("low: ", low.length(), " mid: ", mid.length(), " high: ", high.length())
print("rms: ", analyzer.get_rms(), " centroid: ", analyzer.get_centroid())
FmodAudioEffectRecord#
Recording effect that passes the signal through unchanged and caches audio passing through the bus while recording.
Description#
FmodAudioEffectRecord is a pass-through recording DSP. It does not change the bus output; when recording_active is enabled, it writes audio passing through the effect into an internal buffer. After recording stops, use get_recording() to obtain an AudioStreamWAV, or get_waveform_snapshot() to obtain waveform preview data.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
format |
FORMAT_16_BITS |
As AudioStreamWAV when. |
|
recording_active |
false |
In. |
Methods#
void set_recording_active(record: bool)#
Or stop.
bool is_recording_active() const#
Returns current in.
void set_format(format: FmodAudioEffectRecord.Format)#
Sets WAV.
FmodAudioEffectRecord.Format get_format() const#
Returns WAV.
AudioStreamWAV get_recording() const#
Returns current cache WAV audio stream.
PackedVector2Array get_waveform_snapshot(width: int = 512, seconds: float = 5.0) const#
Returns .
Enumerations#
Format#
Member |
Value |
Description |
|---|---|---|
FORMAT_8_BITS |
0 |
8-bit PCM WAV. |
FORMAT_16_BITS |
1 |
16-bit PCM WAV. |
FORMAT_IMA_ADPCM |
2 |
IMA ADPCM; current will 16-bit PCM WAV. |
Example#
@onready var bus := FmodServer.get_bus("Master")
var recorder := FmodAudioEffectRecord.new()
var recorded_stream: AudioStreamWAV
func _ready():
recorder.format = FmodAudioEffectRecord.FORMAT_16_BITS
bus.add_effect(recorder)
func start_recording():
recorder.recording_active = true
func stop_recording():
recorder.recording_active = false
recorded_stream = recorder.get_recording()
if recorded_stream:
var player := AudioStreamPlayer.new()
add_child(player)
player.stream = recorded_stream
player.play()
func get_waveform_points() -> PackedVector2Array:
return recorder.get_waveform_snapshot(256, 3.0)
FmodAudioEffectCapture#
Capture effect that can read audio frames passing through the bus from a ring buffer.
Description#
FmodAudioEffectCapture will bus audio internal, and PackedVector2Array. suitable for when, audio, before cache, or FMOD output Godot.
Properties#
Type |
Name |
Default |
Description |
|---|---|---|---|
buffer_length |
1.0 |
Ring buffer length, in seconds. |
Methods#
void set_buffer_length(buffer_length: float)#
Sets .
float get_buffer_length() const#
Returns .
bool can_get_buffer(frames: int) const#
Returns true if specified can.
PackedVector2Array get_buffer(frames: int)#
Specified and returns audio.
void clear_buffer()#
Clears .
int get_discarded_frames() const#
Returns .
int get_frames_available() const#
Returns current can.
int get_pushed_frames() const#
Returns .