imode (optional, default=0) -- The mode of the filter. Choose from one of the following:
0 = low-pass (default)
1 = high-pass
2 = band-pass
3 = band-reject
4 = all-pass
iskip (optional, default=0) -- if non zero skip the initialisation of the filter. (New in Csound version 4.23f13 and 5.0)
Performance
ares -- output audio signal.
asig -- input audio signal.
xfco -- filter cut-off frequency in Hz. May be i-time, k-rate, a-rate.
xres -- amount of resonance. Values of 1 to 100 are typical. Resonance should be one or greater. A value of 100 gives a 20dB gain at the cutoff frequency. May be i-time, k-rate, a-rate.
All filter modes can be frequency modulated as well as the resonance can also be frequency modulated.
bqrez is a resonant low-pass filter created using the Laplace s-domain equations for low-pass, high-pass, and band-pass filters normalized to a frequency. The bi-linear transform was used which contains a frequency transform constant from s-domain to z-domain to exactly match the frequencies together. Alot of trigonometric identities where used to simplify the calculation. It is very stable across the working frequency range up to the Nyquist frequency.
Examples
Here is an example of the bqrez opcode. It uses the file bqrez-modern.csd.
Example of the bqrez opcode borrowed from the “rezzy” opcode in Kevin Conder's manual.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac -d ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o bqrez.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1fco:k=line(200,p3,2000);filter-cutoff frequency from .2 to 5 KHz.res:k=p4;resonanceMode:i=p5;modesig:a=vco(0.2,220,1);sawtooth waveform.filt:a=bqrez(sig,fco,res,Mode)sig=balance(filt,sig)outs(sig,sig)endin</CsInstruments><CsScore>;sine wavef1016384101i10310; low passi1+3300; low passi1+311; high passi1+3301; high passe</CsScore></CsoundSynthesizer>
Here is an example of the bqrez opcode. It uses the file bqrez.csd.
Example of the bqrez opcode borrowed from the “rezzy” opcode in Kevin Conder's manual.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform-odac ;;;RT audio out;-iadc ;;;uncomment -iadc if RT audio input is needed too; For Non-realtime ouput leave only the line below:; -o bqrez.wav -W ;;; for file output any platform</CsOptions><CsInstruments>sr=44100ksmps=32nchnls=20dbfs=1instr1;sawtooth waveform.kfcoline200,p3,2000;filter-cutoff frequency from .2 to 5 KHz.kres=p4;resonanceimode=p5;modeasigvco0.2,220,1afiltbqrezasig,kfco,kres,imodeasigbalanceafilt,asigoutsasig,asigendin</CsInstruments><CsScore>;sine wavef1016384101i10310; low passi1+3300; low passi1+311; high passi1+3301; high passe</CsScore></CsoundSynthesizer>