Debian Codegraph @

examples/filesr.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;realtime audio out
5 ;-iadc ;;;uncomment -iadc if realtime audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o filesr.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 sr = 44100
12 ksmps = 32
13 nchnls = 2
14 0dbfs = 1
15
16 ;after an example from Jonathan Murphy
17
18 instr 1
19 ;load sound into an ftable
20 Sfile strcpy "drumsMlp.wav"
21 ilen filelen Sfile
22 isr filesr Sfile
23 isamps = ilen * isr
24 ;adjust the length of the table to be a power of two closest
25 ;to the actual size of the sound
26 isize init 1
27 loop:
28 isize = isize * 2
29 if (isize < isamps) igoto loop
30 itab ftgen 0, 0, isize, 1, Sfile, 0, 0, 0
31 prints "sample rate = %f, size = %f\n", isr, isize ;prints them
32
33 endin
34 </CsInstruments>
35 <CsScore>
36 i1 0 2
37 e
38 </CsScore>
39 </CsoundSynthesizer>