Debian Codegraph @

examples/loscilx.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 loscilx.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Istvan Varga 2006 and Menno Knevel 2022
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 gS_loop = "drumsSlp.wav"
19 gisr filesr gS_loop
20 gilength filelen gS_loop
21 gibeats = 16
22 gi_sampleleft ftgen 1, 0, 0, 1, gS_loop, 0, 4, 0
23
24 instr 1
25 idur = p3
26 iamp = p4
27 ibeat = p5
28 itune = p6
29 ipos = ibeat / gibeats * gilength * gisr
30
31 aenv linseg iamp, idur - 0.01, iamp, 0.01, 0
32 a1, a2 loscilx aenv, itune, 1, 0, 1, ipos, 0 ; in this case stereo file
33 outs a1, a2
34 endin
35
36 </CsInstruments>
37 <CsScore>
38
39 t 0 170
40
41 ; Measure 1
42 i 1 0.0 0.5 0.707 2 1
43 i 1 1.0 0.5 0.707 1 1
44 i 1 2.5 0.5 0.707 0 1
45 i 1 3.0 0.5 0.707 1 .8
46
47 ; Measure 2
48 i 1 4.0 0.5 0.707 0 1
49 i 1 5.0 0.5 0.707 1 1
50 i 1 6.5 0.5 0.707 0 1
51 i 1 7.0 0.5 0.707 1 1
52
53 ; Measure 3
54 i 1 8.0 0.5 0.707 0 1
55 i 1 9.0 0.5 0.707 1 1
56 i 1 10.5 0.5 0.707 0 1
57 i 1 11.0 0.5 0.707 1 1
58
59 ; Measure 4
60 i 1 12.0 0.5 0.707 0 1
61 i 1 13.0 0.5 0.707 1 1
62 i 1 14.5 0.5 0.707 0 1
63 i 1 15.0 0.5 0.707 2 .8
64
65 </CsScore>
66 </CsoundSynthesizer>