Debian Codegraph @

examples/genfarey.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 </CsOptions>
4 <CsInstruments>
5
6 sr=44100
7 ksmps=10
8 nchnls=1
9
10 instr 4
11 kndx init 0 ; read out elements of F_8 one by one and print to file
12 if (kndx < 23) then
13 kelem tab kndx, 1
14 fprintks "farey8table.txt", "%2.6f\\n", kelem
15 kndx = kndx+1
16 endif
17 endin
18 </CsInstruments>
19 <CsScore>
20 ; initialise integer for Farey Sequence F_8
21 f1 0 -23 "farey" 8 0
22 ; if mode=0 then the table stores all elements of the Farey Sequence
23 ; as fractions in the range [0,1]
24 i4 0 1
25 e
26 </CsScore>
27 </CsoundSynthesizer>