Debian Codegraph @

examples/ftexists.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3
4 --nosound
5
6 </CsOptions>
7
8 <CsInstruments>
9
10 ; This is the example file for ftexists
11
12 /*
13
14 ftexists
15
16 Returns 1 if a given table index refers to an existing
17 ftable
18
19 iexists ftexists ifn
20 kexists ftexists kfn
21
22 Args:
23 ifn / kfn: the table index to query
24
25 Returns:
26 iexists / kexists: 1 if a table with index ifn exists, 0 otherwise
27
28 */
29
30 gifn1 ftgen 0, 0, 8, 2, 0
31
32 instr 1
33 iexists1 ftexists gifn1
34 print iexists1
35
36 iexists2 ftexists 2
37 print iexists2
38
39 kexists ftexists 3
40 printf "table 3 exists at time %f", kexists, timeinsts()
41 endin
42
43 </CsInstruments>
44
45 <CsScore>
46
47 f 2 0 8 2 0
48 f 3 1.5 8 2 0
49
50 i 1 0 2
51
52 </CsScore>
53 </CsoundSynthesizer>