Models some of the filter characteristics of a Roland TB303 voltage-controlled filter.
Euler's method is used to approximate the system, rather than traditional filter methods. Cutoff frequency, Q, and distortion are all coupled. Empirical methods were used to try to unentwine, but frequency is only approximate as a result. Future fixes for some problems with this opcode may break existing orchestras relying on this version of tbvcf.
Syntax
ares=tbvcf(asig,xfco,xres,kdist,kasym[,iskip])
arestbvcfasig,xfco,xres,kdist,kasym[,iskip]
Initialization
iskip (optional, default=0) -- if non zero skip the initialisation of the filter. (New in Csound version 4.23f13 and 5.0)
Performance
asig -- input signal. Should be normalized to ±1.
xfco -- filter cutoff frequency. Optimum range is 10,000 to 1500. Values below 1000 may cause problems.
xres -- resonance or Q. Typically in the range 0 to 2.
kdist -- amount of distortion. Typical value is 2. Changing kdist significantly from 2 may cause odd interaction with xfco and xres.
kasym -- asymmetry of resonance. Typically in the range 0 to 1.
Examples
Here is an example of the tbvcf opcode. It uses the file tbvcf.csd.
<CsoundSynthesizer><CsOptions>; Select audio/midi flags here according to platform; Audio out Audio in No messages-odac -iadc -d ;;;RT audio I/O; For Non-realtime ouput leave only the line below:; -o tbvcf.wav -W ;;; for file output any platform</CsOptions><CsInstruments>;---------------------------------------------------------; TBVCF Test; Coded by Hans Mikelson December, 2000;---------------------------------------------------------sr=44100; Sample rateksmps=10; Samples/Kontrol periodnchnls=2; Normal stereo0dbfs=1instr10idur=p3; Durationiamp=p4; Amplitudeifqc=cpspch(p5); Pitch to frequencyipanl=sqrt(p6); Pan leftipanr=sqrt(1-p6); Pan rightiq=p7idist=p8iasym=p9kdclcklinseg0,.002,0.9,idur-.004,0.9,.002,0; Declick envelopekfcoexpseg10000,idur,1000; Frequency envelopeaxvco1,ifqc,2,0.5; Square waveaytbvcfax,kfco,iq,idist,iasym; TB-VCFaybuthpay/1,100; Hi-passoutsay*iamp*ipanl*kdclck,ay*iamp*ipanr*kdclckendin</CsInstruments><CsScore>f1065536101; TeeBee Test; Sta Dur Amp Pitch Pan Q Dist1 Asymi1000.20.57.00.50.02.00.0i100.30.20.57.00.50.82.00.0i100.60.20.57.00.51.62.00.0i100.90.20.57.00.51.72.00.0i101.20.20.57.00.51.82.00.0i101.80.20.57.00.50.02.00.25i102.10.20.57.00.50.82.00.25i102.40.20.57.00.51.62.00.25i102.70.20.57.00.51.82.00.25i103.00.20.57.00.51.92.00.25i103.30.20.57.00.52.02.00.25i103.60.20.57.00.50.02.00.5i103.90.20.57.00.50.82.00.5i104.20.20.57.00.51.62.00.5i104.50.20.57.00.51.82.00.5i104.80.20.57.00.51.92.00.5i105.10.20.57.00.52.02.00.5i105.40.20.57.00.50.02.00.75i105.70.20.57.00.50.82.00.75i106.00.20.57.00.51.62.00.75i106.30.20.57.00.51.82.00.75i106.60.20.57.00.51.92.00.75i106.90.20.57.00.52.02.00.75i107.20.20.57.00.50.02.01.0i107.50.20.57.00.50.82.01.0i107.80.20.57.00.51.62.01.0i108.10.20.57.00.51.82.01.0i108.40.20.57.00.51.92.01.0i108.70.20.57.00.52.02.01.0e</CsScore></CsoundSynthesizer>