function Filter(type) {
    var _this;
    filter_classCallCheck(this, Filter);
    _this = _super.call(this);

    /**
     *  The p5.Filter is built with a
     *  <a href="http://www.w3.org/TR/webaudio/#BiquadFilterNode">
     *  Web Audio BiquadFilter Node</a>.
     *
     *  @property {DelayNode} biquadFilter
     */

    _this.biquad = _this.ac.createBiquadFilter();
    _this.input.connect(_this.biquad);
    _this.biquad.connect(_this.wet);
    if (type) {
      _this.setType(type);
    }

    _this._on = true;
    _this._untoggledType = _this.biquad.type;
    return _this;
  }
<p>A p5.Filter uses a Web Audio Biquad Filter to filter
 the frequency response of an input source. Subclasses
 include:</p>
 <a href="/reference/#/p5.LowPass"><code>p5.LowPass</code></a>:
 Allows frequencies below the cutoff frequency to pass through,
 and attenuates frequencies above the cutoff.<br/>
 <a href="/reference/#/p5.HighPass"><code>p5.HighPass</code></a>:
 The opposite of a lowpass filter. <br/>
 <a href="/reference/#/p5.BandPass"><code>p5.BandPass</code></a>:
 Allows a range of frequencies to pass through and attenuates
 the frequencies below and above this frequency range.<br/>

 The <code>.res()</code> method controls either width of the
 bandpass, or resonance of the low/highpass cutoff frequency.

 This class extends <a href = "/reference/#/p5.Effect">p5.Effect</a>.
 Methods <a href = "/reference/#/p5.Effect/amp">amp()</a>, <a href = "/reference/#/p5.Effect/chain">chain()</a>,
 <a href = "/reference/#/p5.Effect/drywet">drywet()</a>, <a href = "/reference/#/p5.Effect/connect">connect()</a>, and
 <a href = "/reference/#/p5.Effect/disconnect">disconnect()</a> are available.

 @class p5.Filter
 @extends p5.Effect
 @constructor
 @param {String} [type] 'lowpass' (default), 'highpass', 'bandpass'
 @example
 <div><code>
 let fft, noise, filter;

 function setup() {
   let cnv = createCanvas(100,100);
   cnv.mousePressed(makeNoise);
   fill(255, 0, 255);

   filter = new p5.BandPass();
   noise = new p5.Noise();
   noise.disconnect();
   noise.connect(filter);

   fft = new p5.FFT();
 }

 function draw() {
   background(220);

   // set the BandPass frequency based on mouseX
   let freq = map(mouseX, 0, width, 20, 10000);
   freq = constrain(freq, 0, 22050);
   filter.freq(freq);
   // give the filter a narrow band (lower res = wider bandpass)
   filter.res(50);

   // draw filtered spectrum
   let spectrum = fft.analyze();
   noStroke();
   for (let i = 0; i < spectrum.length; i++) {
     let x = map(i, 0, spectrum.length, 0, width);
     let h = -height + map(spectrum[i], 0, 255, height, 0);
     rect(x, height, width/spectrum.length, h);
   }
   if (!noise.started) {
     text('tap here and drag to change frequency', 10, 20, width - 20);
   } else {
     text('Frequency: ' + round(freq)+'Hz', 20, 20, width - 20);
   }
 }

 function makeNoise() {
   // see also: `userStartAudio()`
   noise.start();
   noise.amp(0.5, 0.2);
 }

 function mouseReleased() {
   noise.amp(0, 0.2);
 }

 </code></div>