Vizard 8 » Command Index » Vizard objects » mixer » <mixer>.setFilter
8.1

<mixer>.setFilter

Set the audio filter parameters

<mixer>.setFilter(  
filter  
)  
filter
A viz.AudioFilter object with the following parameters:

Attribute

Description

type

The filter type (see table below).

frequency

The filter frequency in Hz.

Q

The Q factor that controls the dampening of the filter.



The filter type can be one of the following values:

Type

Description

viz.FILTER_NONE

No filter is applied.

viz.FILTER_LOWPASS

Lowpass filter.

viz.FILTER_BANDPASS

Bandpass filter.

viz.FILTER_HIGHPASS

Highpass filter.

viz.FILTER_NOTCH

Notch filter.

Remarks

This command sets the audio filter settings for all sounds played through the mixer. The filter will also affect the output of all sub-mixers. Filtering is disabled by default.

Return Value

None

Example

# Apply lowpass filter to muffle sound
mixer.setFilter(viz.AudioFilter(viz.FILTER_LOWPASS, 300))

See also

<mixer>.getFilter
<mixer>.getPitch
<mixer>.getVolume
<mixer>.setPitch
<mixer>.setVolume