| Hi people,
I ported this peaking lowpass from an article by Jon Dattori about
effect design in JAES´97. The filter itself (12 dB) is not very
impressive and don´t expect to get too much resonance from it. But it
works and has a nice character.It may also be something wrong because I
cannot hear any difference beetwen the 12dB and the 24dB version... ,
I must look at the spectra...
Enjoy it!
Josep M Comajuncosas
sr = 44100
kr = 44100
ksmps = 1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
instr 1; peaking 12dB/oct. LPF (Analog lowpass)
; based on Jon Dattorio / JAES vol.45 n.9 Sept 1997
; ported to Csound by Josep M Comajuncosas / Oct.´98
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NOTE : apparently the cutoff and the resonance
; are not decoupled (nor tuned in fact) at all...
; use them *empyrically*
ibound = 10000
imaxamp = 10000
kfreq init 150
kamp linen 1,.01,p3,.1
apulse1 buzz kamp, kfreq, ibound/kfreq, 1
asaw filter2 apulse1, 1, 1, 1, -.99
; the filter itself
i2pidsr = 2*3.14159265359 / sr
; freq. cutoff
kfco expseg 20, .2, 8000, p3-.2, 20
kfcon = kfco*i2pidsr
kfc = 2*sin(kfcon/2)
; Q (resonance) : stability guaranteed for kqc in [0,1]
; though you can try to go further (>1) at your own risk
kqc = p4
ay4 init 0
ay5 init 0
ay7 init 0
ay8 init 0
ax = asaw/2
ay1 = ax - ay5 - ay7
ay2 = kfc*ay1
ay3 = ay2+ay4
ay4 delay1 ay3
ay5 = ay4*kqc
ay6 = ay5*kfc
ay7 = ay6+ay8
ay8 delay1 ay7
ay9 = ay8*2
; compression to allow a wider range for Q
; be careful, it acts also as a distorter! ;-)
;out tanh(ay9)*imaxamp
out ay9*imaxamp; skip compression
endin
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
instr 2; peaking 24dB/oct. LPF (Analog lowpass)
; like instr 1, but 2 cascaded filter units here
; based on Jon Dattorio / JAES vol.45 n.9 Sept 1997
; ported to Csound by Josep M Comajuncosas / Oct.´98
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NOTE : apparently the cutoff and the resonance
; are not decoupled (nor tuned in fact) at all...
; use them *empyrically*
ibound = 10000
imaxamp = 10000
kfreq init 150
kamp linen 1,.01,p3,.1
apulse1 buzz kamp, kfreq, ibound/kfreq, 1
asaw filter2 apulse1, 1, 1, 1, -.99
; the filter itself
i2pidsr = 2*3.14159265359 / sr
; freq. cutoff
kfco expseg 20, .2, 8000, p3-.2, 20
kfcon = kfco*i2pidsr
kfc = 2*sin(kfcon/2)
; Q (resonance) : stability guaranteed for kqc in [0,1]
; though you can try to go further (>1) at your own risk
kqc = p4
ay4 init 0
ay5 init 0
ay7 init 0
ay8 init 0
ax = asaw/2
ay1 = ax - ay5 - ay7
ay2 = kfc*ay1
ay3 = ay2+ay4
ay4 delay1 ay3
ay5 = ay4*kqc
ay6 = ay5*kfc
ay7 = ay6+ay8
ay8 delay1 ay7
ay14 init 0
ay15 init 0
ay17 init 0
ay18 init 0
ax2 = ay8
ay11 = ax2 - ay15 - ay17
ay12 = kfc*ay11
ay13 = ay2+ay14
ay14 delay1 ay13
ay15 = ay14*kqc
ay16 = ay15*kfc
ay17 = ay16+ay18
ay18 delay1 ay17
ay19 = ay18*2
; compression to allow a wider range for Q
; be careful, it acts also as a distorter! ;-)
;out tanh(ay19)*imaxamp
out ay19*imaxamp; skip compression
endin
f1 0 8192 10 1
; p4 is the resonance control (0 to 1)
i1 0 2 .09
i1 2 2 .3
i1 4 2 .65
i1 6 2 1.1
s
i2 0 2 .09
i2 2 2 .3
i2 4 2 .65
i2 6 2 1.1
e |