Debian Codegraph @

examples/pindex.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in No messages MIDI in
5 -odac -iadc ; -d -M0 ;;;RT audio I/O with MIDI in
6 ; For Non-realtime ouput leave only the line below:
7 ;-o pindex.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10 ;Example by Anthony Kozar Dec 2006
11
12 instr 1
13 inum pcount
14 index init 1
15 loop1:
16 ivalue pindex index
17 printf_i "p%d = %f\n", 1, index, ivalue
18 index = index + 1
19 if (index <= inum) igoto loop1
20 print inum
21 endin
22
23 </CsInstruments>
24 <CsScore>
25 i1 0 3 40 50 ; has 5 pfields
26 i1 1 2 80 ; has 5 due to carry
27 i1 2 1 40 50 60 70 ; has 7
28 e
29 </CsScore>
30 </CsoundSynthesizer>