Debian Codegraph @

examples/cpspch.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;RT audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o cpspch.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 ; Convert pitch-class value into Hz
17
18 ipch = p4
19 icps = cpspch(ipch)
20 print icps
21 asig oscil 0.7, icps, 1
22 outs asig, asig
23
24 endin
25
26 </CsInstruments>
27 <CsScore>
28 ;sine wave.
29 f 1 0 16384 10 1
30
31 i 1 0 1 8.01
32 i 1 + 1 8.02
33 i 1 + 1 8.03
34 i 1 + .5 5.09
35
36 e
37 </CsScore>
38 </CsoundSynthesizer>