Debian Codegraph @

examples/opnot.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o opand.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 instr 1
17
18 kval randomh 0, 1.2, 20 ;choose between 0 and 1.2
19 if !(kval >0 && kval<=.5) then ;3 possible outcomes
20 kval = 1
21 elseif !(kval >.5 && kval<=1) then
22 kval =2
23 elseif !(kval >1) then
24 kval =3
25 endif
26
27 printk2 kval ;print value when it changes
28 asig poscil .7, 440*kval, 1
29 outs asig, asig
30
31 endin
32 </CsInstruments>
33 <CsScore>
34 f1 0 16384 10 1
35
36 i 1 0 5
37 e
38 </CsScore>
39 </CsoundSynthesizer>