Table Of Contents

Previous topic

17.17. The SoundEffect Object

Next topic

17.20. The Source Object

This Page

17.19. The SoundFilter Object

A SoundFilter object represents a filter created with a set of parameters that can be applied to the output of a source.

17.19.1. Constructor

A SoundFilter object can be constructed with SoundDevice.createFilter.

17.19.2. Properties

17.19.2.1. name

Summary

The name that identifies the filter object.

Syntax

// Get
var name = filter.name;

// Set
filter.name = "LowPass01";

17.19.2.2. type

Summary

The type of the filter, as a string.

Syntax

// Get
var type = filter.type;

Note

Read Only

17.19.3. LowPass Properties

A LowPass filter is used to remove high frequency content from a signal.

17.19.3.1. gain

Summary

The gain applied to the LowPass filter.

Syntax

// Get
var gain = filter.gain;

// Set
filter.gain = 0.4;

Range

0.0 to 1.0

Default

1.0

17.19.3.2. gainHF

Summary

The gain applied to the LowPass filter acting on high frequencies.

Syntax

// Get
var gainHF = filter.gainHF;

// Set
filter.gain = 0.9;

Range

0.0 to 1.0

Default

1.0