Toms

instr 28
; Cf. http://www.csounds.com/ezine/autumn1999/synthesis/
; parameters names
; 1 2 3 4 5 6 7 8 9 10 
; i st dur amp fqa rez fq1 hit ham pan
;;Csgrouper param recognition ; CSGF=3:dur=1; CSGF=4:amp=62; CSGF=5:fqa=9.00; CSGF=6:rez=0.5
; CSGF=7:fq1=9.00; CSGF=8:hit=0.18; CSGF=9:ham=60; CSGF=10:pan=0.5;
idur = p3;
iamp = ampdb(p4);
ifco = cpspch(p5);
irez = p6;
ifqc = cpspch(p7);
ihit = p8;
ihamp = p9;
ipan = p10;
ipanr = ipan;
ipanl = 1-ipan;
afqc1 linseg 1+iamp/30000, ihit*.5*idur, 1, .1, 1 ; Pitch bend
afqc = afqc1*afqc1 ; Pitch bend squared
adclck linseg 0, .002, 1, idur-.004, 1, .002, 0 ; Declick envelope
aamp1 expseg .01, .001, 1, idur-.001, .04 ; Tone envelope
aamp2 expseg .01, .001, 1, idur*ihit-.001, .01 ; Noise envelope
arnd1 rand ihamp ; Genrate noise
arnd rezzy arnd1, ifco, irez, 1 ; High pass mode
asig oscil 1, afqc*ifqc*(1+arnd*aamp2), 1 ; Frequency modulation with noise
aout = asig*iamp*aamp1*adclck ; Apply amp envelope and declick
 outs aout*ipanl, aout*ipanr ; Output the sound
endin;
; A typical score is presented below. The parameter Q controls the resonance of the high pass filter. 
; This can be used to control how noise like the frequency modulation is. 
; Fqc is the cut off frequency of the high pass filter. 
; HitDur controls the decay time for the noise as well as the pitch bend envelope. 
; HitAmp controls the overall amplitude of the filtered noise.
; Sta Dur Amp Pitch Q Fqc HitDur HitAmp Pan
;i100 0.125 .13 23000 6.09 30 1200 .18 70 .2
;i100 0.250 .15 25000 6.09 20 300 .22 40 .5
;i100 0.500 .15 25000 6.09 20 600 .22 70 .4
;i100 0.750 .25 29000 7.02 30 900 .11 95 .8
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s