vlowres — A bank of filters in which the cutoff frequency can be separated under user control.
asig -- input signal
kfco -- frequency cutoff (not in Hz)
ksep -- frequency cutoff separation for each filter
vlowres (variable resonant lowpass filter) allows a variable response curve in resonant filters. It can be thought of as a bank of lowpass resonant filters, each with the same resonance, serially connected. The frequency cutoff of each filter can vary with the kcfo and ksep parameters.
Here is an example of the vlowres opcode. It uses the files vlowres.orc, vlowres.sco, and beats.wav.
Example 415. Example of the vlowres opcode.
/* vlowres.orc */ ; Initialize the global variables. sr = 44100 kr = 4410 ksmps = 10 nchnls = 1 ; Instrument #1. instr 1 ; Use a nice sawtooth waveform. asig vco 32000, 220, 1 ; Vary the cutoff frequency from 30 to 300 Hz. kfco line 30, p3, 300 kres = 25 iord = 2 ksep = 20 ; Apply the filters. avlr vlowres asig, kfco, kres, iord, ksep ; It gets loud, so clip the output amplitude to 30,000. a1 clip avlr, 1, 30000 out a1 endin /* vlowres.orc */
/* vlowres.sco */ ; Table #1, a sine wave. f 1 0 16384 10 1 ; Play Instrument #1 for two seconds. i 1 0 2 e /* vlowres.sco */