當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Processing BandPass.bw()用法及代碼示例

Processing, 類BandPass中的bw()用法介紹。

用法

  • .bw(bw)

返回

  • void

說明

設置濾波器的帶寬。

例子

import processing.sound.*;

WhiteNoise noise;
BandPass bandPass;

float freq=2500;
float bw=80;

void setup() {
  size(640,360);
  background(255);
    
  // Create a noise generator and a highpass filter
  noise = new WhiteNoise(this);
  bandPass = new BandPass(this);
    
  noise.play(0.5);
  bandPass.process(noise);

  // Change the cutoff frequency and bandwidth of the filter
  bandPass.bw(bw);
  bandPass.freq(freq);
}      

void draw() {
}

相關用法


注:本文由純淨天空篩選整理自processing.org大神的英文原創作品 BandPass.bw()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。