Debian Codegraph @

examples/loop_gt.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 RT audio input is needed too
6 ; For Non-realtime ouput leave only the line below:
7 ; -o loop_gt.wav -W ;;; for file output any platform
8
9 ; By Stefano Cucchi - 2021
10
11 </CsOptions>
12 <CsInstruments>
13
14 sr = 44100
15 ksmps = 32
16 nchnls = 2
17 0dbfs = 1
18
19 gisaw ftgen 3, 0, 16384, 10, 0, .2, 0, .4, 0, .6, 0, .8, 0, 1, 0, .8, 0, .6, 0, .4, 0,.2
20
21 instr 1 ;master instrument
22
23 indxFreq = p5
24
25 loop:
26
27 ifreq = p4 + indxFreq
28 print ifreq
29 iamp = 0.5/((p5-p7)/p6)
30 event_i "i", 10, 0, p3, iamp, ifreq
31 loop_gt indxFreq, p6, p7, loop
32
33 endin
34
35
36 instr 10
37
38 asig oscili p4, p5, gisaw
39 asig butterhp asig, 50
40 kdeclick linseg 0, 0.1, 1, p3-0.2, 1, 0.1, 0
41 outs asig * kdeclick, asig * kdeclick
42
43 endin
44
45 </CsInstruments>
46 <CsScore>
47
48
49 i1 0 2 200 10 3 1
50
51 i1 2 2 200 4 0.3 1
52
53 i1 4 2 200 55 7 1
54
55 i1 6 2 200 3 0.2 1
56
57 e
58 </CsScore>
59 </CsoundSynthesizer>