Debian Codegraph @

examples/tigoto2.csd

raw
1 <CsoundSynthesizer>
2 <CsOptions>
3 ; Select audio/midi flags here according to platform
4 -odac ;;;RT 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 tigoto2.wav -W ;;; for file output any platform
8 </CsOptions>
9 <CsInstruments>
10
11 ; by Steven Yi 2024
12
13 sr = 44100
14 ksmps = 32
15 nchnls = 2
16 0dbfs = 1
17
18 instr 1
19
20 iamp = ampdbfs(p5)
21 ipch = cps2pch(p4,12)
22
23 xtratim 4 ; extend the duration of the note
24 tigoto skipInit ; csound "jumps" to the label, skipping initialization for the code in between
25 ; but only if this is a "tied" note
26 kpch = port(ipch, 0.05, ipch)
27 asig = vco2(iamp, kpch)
28 ;asig = zdf_2pole(asig, min:k(10000, kpch * 16), 4) ; uncomment to use filter
29 asig *= linsegr(0, 1, 1, 4, 0)
30 out(asig, asig)
31
32 skipInit:
33
34 endin
35
36 </CsInstruments>
37 <CsScore>
38 i1 0 -.5 8.00 -12
39 i1 + -.5 9.00 -12
40 i1 + 2 6.00 -12
41
42 i1.1 .25 -.5 9.00 -12
43 i1.1 + -.5 10.00 -12
44 i1.1 + 2 7.00 -12
45
46 i1.2 1 -.25 7.00 .
47 i1.2 + 2 8.00 .
48 </CsScore>
49 </CsoundSynthesizer>