Debian Codegraph @

examples/sqrt.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 sqrt.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 0dbfs = 1
14 nchnls = 2
15
16 instr 1
17
18 asig pluck 0.7, 55, 55, 0, 1
19 kpan line 0,p3,1
20 kleft = sqrt(1-kpan)
21 kright = sqrt(kpan)
22 printks "square root of left channel = %f\\n", 1, kleft ;show coarse of sqaure root values
23 outs asig*kleft, asig*kright ;where 0.707126 is between 2 speakers
24
25 endin
26 </CsInstruments>
27 <CsScore>
28
29 i 1 0 10
30 e
31 </CsScore>
32 </CsoundSynthesizer>