最終更新:2015-03-14 (土) 14:36:37 (3321d)  

BiquadFilterNode
Top / BiquadFilterNode

https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#BiquadFilterNode

http://webaudio.github.io/web-audio-api/#the-biquadfilternode-interface

インターフェイス

enum BiquadFilterType {
  "lowpass",
  "highpass",
  "bandpass",
  "lowshelf",
  "highshelf",
  "peaking",
  "notch",
  "allpass"
}

interface BiquadFilterNode : AudioNode {

    attribute BiquadFilterType type;
    readonly attribute AudioParam frequency; // in Hertz
    readonly attribute AudioParam detune; // in Cents
    readonly attribute AudioParam Q; // Quality factor
    readonly attribute AudioParam gain; // in Decibels

    void getFrequencyResponse(Float32Array frequencyHz,
                              Float32Array magResponse,
                              Float32Array phaseResponse);

};

var filter = context.createBiquadFilter();
filter.type = 3;  // In this case it's a lowshelf filter
filter.frequency.value = 440;
filter.Q.value = 0;
filter.gain.value = 0;

プロパティ

プロパティ意味単位デフォルト値と範囲
frequency周波数ヘルツ350Hz, with a nominal range of 10 to the Nyquist frequency (half the sample-rate).
detune
QQ値1, with a nominal range of 0.0001 to 1000.
gainゲインデジベル?0, with a nominal range of -40 to 40.

メソッド

フィルタの種類

  • ローパスフィルタ - 特定の周波数より下だけを通す
  • ハイパスフィルタ - 特定の周波数より上だけを通す
  • バンドパスフィルタ? - 特定の周波数範囲だけを通す
  • ローシェルフフィルタ? - 特定の周波数より下を増幅または減衰させる
  • ハイシェルフフィルタ? - 特定の周波数より上を増幅または減衰させる
  • ピーキングフィルタ? - 特定の周波数を増幅する(減衰も可)
  • ノッチフィルタ - 特定の帯域を減衰させる
  • オールパスフィルタ? - すべての周波数を通し位相特性だけを回転させる

Web Audio APIでAudioビジュアリゼーションをしてみよう@Homage to Rez

変更点

関連

参考