Debian Codegraph @

examples/ftgen-2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 ; Audio out Audio in
5 -odac -iadc ;;;RT audio I/O
6 ; For Non-realtime ouput leave only the line below:
7 ; -o ftgen-2.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 48000
12 ksmps = 16
13 nchnls = 2
14
15 ;Example by Jonathan Murphy 2007
16
17 0dbfs = 1
18
19 instr 1
20
21 Sfile = "drumsMlp.wav"
22
23 ilen filelen Sfile ; Find length
24 isr filesr Sfile ; Find sample rate
25
26 isamps = ilen * isr ; Total number of samples
27 isize init 1
28
29 loop:
30 isize = isize * 2
31 ; Loop until isize is greater than number of samples
32 if (isize < isamps) igoto loop
33
34 itab ftgen 0, 0, isize, 1, Sfile, 0, 0, 0
35 print isize
36 print isamps
37
38 turnoff
39 endin
40
41 </CsInstruments>
42 <CsScore>
43 i1 0 10
44 e
45 </CsScore>
46 </CsoundSynthesizer>
47