Debian Codegraph @

examples/max_k.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;-Ma ;;;realtime audio out and midi in (on all inputs)
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o max_k.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Stefano Cucchi 2020
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18
19 instr 1
20
21 anoise noise 0.1, 0.1 ; generate some noise
22 arandom randomi 400, 12000, 4 ; generate random numbers from 400 to 1200
23
24 ktrig metro 3 ; trigger signal
25
26 kmin max_k arandom, ktrig, 3 ; minumum value
27 kmax max_k arandom, ktrig, 2 ; maximum value
28
29 printk 0.2, kmin
30 printk 0.2, kmax
31
32 anoisehp butterhp anoise, kmin ; hipass filter at kmin frequency
33 anoiselp butterlp anoise, kmax*0.5 ; lopass filter at kmin/2 frequency
34
35 acomp oscil 0.1, 440 ; comparator signal for consistent amplitude
36
37 anoisehp balance anoisehp, acomp ; adjusting the volume
38 anoiselp balance anoiselp, acomp ; adjusting the volume
39
40 outs anoisehp, anoiselp
41
42 endin
43
44 </CsInstruments>
45 <CsScore>
46
47 i1 0 10
48 e
49 </CsScore>
50 </CsoundSynthesizer>