p0 = output start time (seconds) p1 = input start time (seconds) p2 = input duration (seconds) p3 = amplitude multiplier (relative multiplier of input signal) p4 = ring-down duration (seconds) p5 = input channel p6 = pan (0-1 stereo; 0.5 is middle) p7, p8, p9, ... pN-2, pN-1, pN starting with p7, the next N pfields are triples, the first being the center frequency of a filter "hump" (Hz or oct.pc * (see note below)), the second being the bandwidth of the "hump" (expressed as a multiplier of the center frequency, 0-1), and the third being the relative amplitude of that "hump" in the final constructed filter (0-1). Up to 60 cf-bw-amp triples can be specified. p3 (amplitude), p6 (pan) as well as the center frequency, bandwidth, and relative amplitude pfields for individual bands can receive dynamic updates from a table or real-time control source. * If the value of the center frequency pfield(s) ("CFREQ1 ... CFREQN") is < 15.0, it assumes oct.pc. Use the pchcps scorefile convertor for direct frequency specification below 15.0 Hz. Author: John Gibson, 25 Feb 2007
oct.pc format generally will not work as you expect for the center frequency specifications if the pfield changes dynamically. This is because of the 'mod 12' aspect of the pitch-class (.pc) specification. Use direct frequency (hz) or linear octaves instead.
The bandwith of each filter is specified as a multiplier of the center frequency of each filter. The older IIR instrument had an option to specify this bandwidth directly as a Hz value. This is not the case with FILTERBANK.
The point of the ring-down duration parameter (p4) is to let you control how long the filter will sound after the input has stopped. Too short a time, and the sound may be cut off prematurely, resulting in a click.
The output of FILTERBANK can be either mono or stereo.
rtsetparams(44100, 2) load("FILTERBANK") rtinput("mysound.aif") inchan = 0 inskip = 0 dur = DUR() ringdur = 10 amp = 0.25 bw = 0.0003 cf1 = maketable("line", "nonorm", 100, 0,200, 1,1200) cf2 = maketable("line", "nonorm", 100, 0,1100, 1,300) cf3 = maketable("line", "nonorm", 100, 0,600, 1,2200) cf4 = maketable("line", "nonorm", 100, 0,2000, 1,900) start = 0 FILTERBANK(start, inskip, dur, amp, ringdur, inchan, pan=0.5, cf1, bw, g=1, cf2, bw, g=1, cf3, bw, g=1, cf4, bw, g=1)
rtsetparams(44100, 2) load("FILTERBANK") rtinput("mysound.aif") inchan = 0 inskip = 0 dur = DUR() ringdur = 5 amp = 0.1 bw = maketable("line", "nonorm", 1000, 0,0.01, dur,0.001, dur+ringdur,0.001) start = 0 FILTERBANK(start, inskip, dur, amp, ringdur, inchan, pan=0.1, cf=9.02, bw, g=1, cf=9.09, bw, g=1, cf=10.01, bw, g=1, cf=10.06, bw, g=1, cf=11.02, bw, g=1) FILTERBANK(start, inskip, dur, amp, ringdur, inchan, pan=0.9, cf=8.02, bw, g=1, cf=9.05, bw, g=1, cf=10.03, bw, g=1, cf=10.10, bw, g=1, cf=11.04, bw, g=1)