Debian Codegraph @

examples/ftsamplebank.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;RT audio out
5 ;-iadc ;;;uncomment -iadc if RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o diskin.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10 0dbfs = 1
11
12 ;load all samples in a given directory into function tables and play them using instrument 1000
13 instr 1
14 iFirstTableNumber = 60;
15 iFileCount init 1
16 iNumberOfFiles ftsamplebank "../examples/", iFirstTableNumber, 0, 4, 1
17
18 until iFileCount>=iNumberOfFiles do
19 event_i "i", 1000, iFileCount, 1, iFirstTableNumber+iFileCount
20 iFileCount = iFileCount+1
21 enduntil
22
23 endin
24
25 instr 1000
26 iTable = p4
27 aOut loscil3 1, 1, iTable, 1, 0;
28 outs aOut, aOut
29 endin
30
31 </CsInstruments>
32 <CsScore>
33 i1 0 20
34 </CsScore>
35 </CsoundSynthesizer>
36
37
38