Debian Codegraph @

examples/ftprint.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3
4 --nosound
5
6 </CsOptions>
7 <CsInstruments>
8
9 ; This is the example file for ftprint
10
11 /*
12
13 ftprint
14
15 Print the contents of an f-table
16 (mostly for debuggin purposes)
17
18 ftprint ifn, ktrig=1, kstart=0, kend=0, kstep=1, inumcols=0
19
20 ifn: the table to print
21 ktrig: table will be printed whenever this changes
22 from non-positive to positive
23 kstart: start index
24 kend: end index (non inclusive)
25 kstep: number of elements to skip
26 inumcols: number of elements to print per line
27
28 See also: printarray
29
30 */
31
32 instr 1
33 ifn ftgentmp 0, 0, -13, -2, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12
34
35 ; print all elements
36 ftprint ifn
37
38 ; print all elements in columns of 4 elements
39 ftprint ifn, 1, 0, 0, 1, 4
40
41 ; assume that a table holds a 2D matrix, print the matrix
42 imatrix ftgentmp 0, 0, 0, -2, \
43 00, 01, 02, 03, 04, \
44 10, 11, 12, 13, 14, \
45 20, 21, 22, 23, 24, \
46 30, 31, 32, 33, 34
47
48 ; print the whole matrix, 5 columns per line
49 ftprint imatrix, 1, 0, 0, 1, 5
50
51 ; print one row
52 irow = 2
53 inumcols = 5
54 ftprint imatrix, 1, 2*inumcols, 3*inumcols
55
56 ; print one column
57 ftprint imatrix, 1, 3, 0, inumcols, 1
58
59 turnoff
60 endin
61
62 </CsInstruments>
63
64 <CsScore>
65 i 1 0 0.01
66 </CsScore>
67
68 </CsoundSynthesizer>