Tuesday 25 May 2010

Csound Programs

Pure Tone Programs

Orchestra File


; 125 Hz frequency tone
;Lewis125.orc
;440 Hz sine wave at amplitude 10000

sr = 44100
kr = 11025
ksmps = 4
nchnls = 2

instr 1
idur = p3
a1 oscil 10000,125,1

;The number in bold is changed for each frequency

outs a1, a1


endin


Score File

; 5 seconds score
;Lewis125.sco

f1 0 4096 10 1 ; use gen 10 to compute a sine wave
i1 0 5 ; run "inst 1" fom time 0 for 5 seconds
e ; end of score


Bandpass Noise Programs

;Orchestra File for Bandpass Noise
;Referenced from Clive Greated Example 15 - APSS - Edinburgh 2010

sr = 44100
kr = 11025
ksmps = 4
nchnls = 2

instr 2
icf = p5
ibw = p6
anoise rand p4
afilt reson anoise, icf, ibw
outs afilt,afilt
endin


;Score File for BandPass Noise
;References from Clive Greated - example 15 - Edinburgh University - APSS - 2010 FM with varying harmonicity ratio

f1 0 4096 10 1
; use gen 10 to compute a sine wave

;ins st dur amp cf bw
i 2 0 3 10 125 10
i 2 6 3 25 250 20
i 2 12 3 62.5 500 40
i 2 18 3 156 1000 80
i 2 24 3 200 1500 100
i 2 30 3 391 2000 160
i 2 36 3 450 2500 200
i 2 42 3 600 3000 250
i 2 48 3 800 3500 290

i 2 54 3 976 4000 320
e
; end of score

No comments:

Post a Comment