-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrum.csd
executable file
·162 lines (134 loc) · 2.45 KB
/
drum.csd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<CsoundSynthesizer>
<CsOptions>
-odac ; real time render
;-o clairLune.wav -W ; file render
</CsOptions>
<CsInstruments>
sr = 44100 ; CD sample-rate
ksmps = 10
nchnls = 1 ; mono sound
instr 1; kick
iamp = p4
k1 expon 120, .2, 50
k2 expon 500, .4, 200
a1 oscil iamp, k1, 1
a2 reson a1, k2, 50
a3 butterlp a2+a1,k1,1
a4 butterlp a3, k1,1
a5 butterlp a4,2500,1
a6 butterhp a5,50
a7 butterhp a6,50
a8 linen a7,0.01,p3, .2
out a8
endin
instr 2; hithat
ilen init p3
iamp init p4
kcutfreq expon 10000, 0.1, 2500
aamp expon iamp, 0.1, 10
arand rand aamp
alp1 butterlp arand,kcutfreq
alp2 butterlp alp1,kcutfreq
ahp1 butterhp alp2,3500
asigpre butterhp ahp1,3500
asig linen (asigpre+arand/2),0,ilen, .05
out asig
endin
instr 3; snare
aenv1 expon p4, 0.03, 0.5
a1 oscili aenv1, 147, 1
aamp expon 1000, 0.2, 10
arand rand aamp
outs a1+arand, a1+arand
endin
</CsInstruments>
<CsScore>
f 1 0 4096 10 1 ; sine wave
t 0 60 ; 1 beats per second
f 2 0 1024 10 1
#define PATTERN_DRUM_1
#
i 2 + 0.66 2000
i 2 + . .
i 2 + . .
i 2 + . .
i 2 + . .
i 2 + . .
i 2 + . .
i 2 + . .
#
#define PATTERN_DRUM_2
#
i 2 + 0.33 2500
i 1 ^ 0.33 10
i 2 + 0.33 2500
i 2 + 0.33 2500
i 3 ^ 0.33 13000
i 2 + 0.33 2500
#
#define PATTERN_DRUM_3
#
i 2 + 0.33 2500
i 1 ^ 0.33 10
i 2 + 0.33 2500
i 3 ^+0.3 0.2 13000
i 2 + 0.5 2500
i 1 ^ 0.3 10
i 3 ^+0.3 0.2 13000
i 2 + 0.5 2500
i 1 ^ 0.3 10
i 3 ^+0.3 0.2 13000
i 2 + 0.5 2500
i 1 ^ 0.3 10
i 3 ^+0.3 0.2 13000
i 3 ^+0.7 0.2 13000
#
#define PATTERN_DRUM_4
#
$PATTERN_DRUM_3
i 3 + 0.15 10000
#
;
;
$PATTERN_DRUM_1
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_3
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_3
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_2
$PATTERN_DRUM_4
e
</CsScore>
</CsoundSynthesizer>
<bsbPanel>
<label>Widgets</label>
<objectName/>
<x>100</x>
<y>100</y>
<width>320</width>
<height>240</height>
<visible>true</visible>
<uuid/>
<bgcolor mode="nobackground">
<r>255</r>
<g>255</g>
<b>255</b>
</bgcolor>
</bsbPanel>
<bsbPresets>
</bsbPresets>