Debian Codegraph @

examples/vaddv.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac -iadc -nm0 ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o cigoto.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11
12 sr=44100
13 ksmps=128
14 nchnls=2
15
16 opcode TableDumpSimp, 0, ijo
17 ;prints the content of a table in a simple way
18 ifn, iprec, ippr xin; function table, float precision while printing (default = 3), parameters per row (default = 10, maximum = 32)
19 iprec = (iprec == -1 ? 3 : iprec)
20 ippr = (ippr == 0 ? 10 : ippr)
21 iend = ftlen(ifn)
22 indx = 0
23 Sformat sprintf "%%.%df\t", iprec
24 Sdump = ""
25 loop:
26 ival tab_i indx, ifn
27 Snew sprintf Sformat, ival
28 Sdump strcat Sdump, Snew
29 indx = indx + 1
30 imod = indx % ippr
31 if imod == 0 then
32 puts Sdump, 1
33 Sdump = ""
34 endif
35 if indx < iend igoto loop
36 puts Sdump, 1
37 endop
38
39 instr 1
40 ifn1 = p4
41 ifn2 = p5
42 ielements = p6
43 idstoffset = p7
44 isrcoffset = p8
45 kval init 25
46 vaddv ifn1, ifn2, ielements, idstoffset, isrcoffset, 1
47 turnoff
48 endin
49
50 instr 2
51 TableDumpSimp p4, 3, 16
52 endin
53
54 </CsInstruments>
55 <CsScore>
56
57 f 1 0 16 -7 1 15 16
58
59 f 2 0 16 -7 1 15 2
60
61
62 i2 0.0 0.2 1
63 i2 0.2 0.2 2
64 i1 0.4 0.01 1 2 5 3 8
65 i2 0.8 0.2 1
66 i1 1.0 0.01 1 2 5 10 -2
67 i2 1.2 0.2 1
68 i1 1.4 0.01 1 2 8 14 0
69 i2 1.6 0.2 1
70 i1 1.8 0.01 1 2 8 0 14
71 i2 2.0 0.2 1
72 i1 2.2 0.002 1 1 8 5 2
73 i2 2.4 0.2 1
74 e
75
76
77 </CsScore>
78 </CsoundSynthesizer>