Debian Codegraph @

examples/musical/FtmorfRandomh_Cucchi.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 FtmorfRandomh_Cucchi.wav -W ;;; for file output any platform
8
9 ; By Stefano Cucchi - 2022
10 </CsOptions>
11 <CsInstruments>
12
13 sr = 48000
14 kr = 4800
15 ksmps = 10
16 nchnls = 2
17 0dbfs = 1
18
19 garevL init 0
20 garevR init 0
21
22 instr 1
23
24
25 kgenenvelop linseg 0, 0.3, 0.3, p3-0.6, 0.3, 0.3, 0
26
27 kftndx1 randomh 0, 7, 2.1, 0, 6.6 ; try "randomi" if you want a smooth transition betwenn waveforms instead of jumps
28 iresfn1 = 2
29 iftfn1 = 1
30 ftmorf kftndx1, iftfn1, iresfn1
31 asuono1 oscili 0.5, p4, 2
32 outch 1, asuono1 * kgenenvelop
33
34 kftndx2 randomh 0, 7, 3.2, 0, 2.56
35 iresfn2 = 2
36 iftfn2 = 1
37 ftmorf kftndx2, iftfn2, iresfn2
38 asuono2 oscili 0.5, p5, 2
39 outch 2, asuono2 * kgenenvelop
40
41 kftndx3 randomh 0, 7, 2.3, 0.2
42 iresfn3 = 2
43 iftfn3 = 1
44 ftmorf kftndx3, iftfn3, iresfn3
45 asuono3 oscili 0.5, p6, 2
46 outch 1, asuono3 * kgenenvelop
47
48
49 kftndx4 randomh 0, 7, 2.4, 0, 4.77
50 iresfn4 = 2
51 iftfn4 = 1
52 ftmorf kftndx4, iftfn4, iresfn4
53 asuono4 oscili 0.5, p7, 2
54 outch 2, asuono4 * kgenenvelop
55
56
57 garevL = garevL + (asuono1+asuono3)*kgenenvelop
58 garevR = garevR + (asuono2+asuono4)*kgenenvelop
59
60 endin
61
62 instr 10
63
64 arevL reverb2 garevL, 2.4, 0.4
65 arevR reverb2 garevR, 2.2, 0.8
66
67 outch 1, arevL*0.2
68 outch 2, arevR*0.2
69
70 clear garevL
71 clear garevR
72
73 endin
74
75 </CsInstruments>
76 <CsScore>
77
78 f1 0 8 -2 3 4 5 6 7 8 9 10 ;
79 f2 0 4097 10 1 /*contents of f4 dont matter */
80
81 f3 0 4097 10 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
82 f4 0 4097 10 1 0 1
83 f5 0 4097 10 1 0 1 0 1 0 1 0 1 0 0 0 0 0 1
84 f6 0 4097 -7 1 2000 1 10 -1 2000 -1 87 1
85 f7 0 4097 10 1 1 1 1 1 1
86 f8 0 4097 10 1 1 1 0 1 1 0 0 0 1 0 1 1
87 f9 0 4097 -7 1 2000 -1 10 1 2000 -1 87 1
88 f10 0 4097 10 1
89
90
91 i1 0 20 77 77.2 77.7 78.1
92 i 10 0 25
93
94 e 1
95
96 </CsScore>
97 </CsoundSynthesizer>