This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

type

Summary

The type of BiquadFilterNode (filtering algorithm) the node is implementing.

Property of apis/webaudio/BiquadFilterNodeapis/webaudio/BiquadFilterNode

Syntax

var result = BiquadFilterNode.type;
BiquadFilterNode.type = value;

Return Value

Returns an object of type unsigned shortunsigned short

Uses one of the following constant values:

  • LOWPASS (0) (default), a standard second-order resonant lowpass filter with 12dB/octave rolloff;
  • HIGHPASS (1), a standard second-order resonant highpass filter with 12dB/octave rolloff;
  • BANDPASS (2), a second-order bandpass filter;
  • LOWSHELF (3), a second-order lowshelf filter;
  • HIGHSHELF (4), a second-order highshelf filter;
  • PEAKING (5), a boost (or attenuation) to a range of frequencies;
  • NOTCH (6), restricting a set of frequencies;
  • ALLPASS (7), a second-order allpass filter.

Examples

var audioCtx = new AudioContext();
var biquadFilter = audioCtx.createBiquadFilter();
biquadfilter.type = 'lowpass';

Related specifications

W3C Web Audio API
W3C Editor’s Draft