libfluidsynth  2.3.5
Effect - IIR Filter

Functions for configuring the built-in IIR filter effect. More...

Enumerations

enum  fluid_iir_filter_flags {
  FLUID_IIR_Q_LINEAR = 1 << 0 ,
  FLUID_IIR_Q_ZERO_OFF = 1 << 1 ,
  FLUID_IIR_NO_GAIN_AMP = 1 << 2
}
 Specifies optional settings to use for the custom IIR filter. More...
 
enum  fluid_iir_filter_type {
  FLUID_IIR_DISABLED = 0 ,
  FLUID_IIR_LOWPASS ,
  FLUID_IIR_HIGHPASS ,
  FLUID_IIR_LAST
}
 Specifies the type of filter to use for the custom IIR filter. More...
 

Functions

int fluid_synth_set_custom_filter (fluid_synth_t *, int type, int flags)
 Configure a general-purpose IIR biquad filter. More...
 

Detailed Description

Functions for configuring the built-in IIR filter effect.

Enumeration Type Documentation

◆ fluid_iir_filter_flags

Specifies optional settings to use for the custom IIR filter.

Can be bitwise ORed.

Enumerator
FLUID_IIR_Q_LINEAR 

The Soundfont spec requires the filter Q to be interpreted in dB.

If this flag is set the filter Q is instead assumed to be in a linear range

FLUID_IIR_Q_ZERO_OFF 

If this flag the filter is switched off if Q == 0 (prior to any transformation)

FLUID_IIR_NO_GAIN_AMP 

The Soundfont spec requires to correct the gain of the filter depending on the filter's Q.

If this flag is set the filter gain will not be corrected.

◆ fluid_iir_filter_type

Specifies the type of filter to use for the custom IIR filter.

Enumerator
FLUID_IIR_DISABLED 

Custom IIR filter is not operating.

FLUID_IIR_LOWPASS 

Custom IIR filter is operating as low-pass filter.

FLUID_IIR_HIGHPASS 

Custom IIR filter is operating as high-pass filter.

Function Documentation

◆ fluid_synth_set_custom_filter()

int fluid_synth_set_custom_filter ( fluid_synth_t synth,
int  type,
int  flags 
)

Configure a general-purpose IIR biquad filter.

Parameters
synthFluidSynth instance
typeType of the IIR filter to use (see fluid_iir_filter_type)
flagsAdditional flags to customize this filter or zero to stay with the default (see fluid_iir_filter_flags)
Returns
FLUID_OK if the settings have been successfully applied, otherwise FLUID_FAILED

This is an optional, additional filter that operates independently from the default low-pass filter required by the Soundfont2 standard. By default this filter is off (FLUID_IIR_DISABLED).