Debian Codegraph @

examples/tablexkt.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 tablexkt.wav -W ;;; for file output any platform
8 </CsOptions>
9
10 <CsInstruments>
11 ;Example by Jonathan Murphy
12
13 sr = 44100
14 ksmps = 10
15 nchnls = 1
16
17 instr 1
18
19 ifn = 1 ; query f1 as to number of samples
20 ilen = nsamp(ifn)
21
22 itrns = 4 ; transpose up 4 octaves
23 ilps = 16 ; allow iwsize/2 samples at start
24 ilpe = ilen - 16 ; and at end
25 imode = 3 ; loop forwards and backwards
26 istrt = 16 ; start 16 samples into loop
27
28 alphs lphasor itrns, ilps, ilpe, imode, istrt
29 ; use lphasor as index
30 andx = alphs
31
32 kfn = 1 ; read f1
33 kwarp = 4 ; anti-aliasing, should be same value as itrns above
34 iwsize = 32 ; iwsize must be at least 8 * kwarp
35
36 atab tablexkt andx, kfn, kwarp, iwsize
37
38 atab = atab * 10000
39
40 out atab
41
42 endin
43
44 </CsInstruments>
45
46 <CsScore>
47 f 1 0 262144 1 "drumsMlp.wav" 0 4 1
48 i1 0 60
49 e
50 </CsScore>
51
52 </CsoundSynthesizer>