-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStrangerThings.rb
More file actions
398 lines (323 loc) · 7.08 KB
/
StrangerThings.rb
File metadata and controls
398 lines (323 loc) · 7.08 KB
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
##Stranger Things by Jan Albers
use_bpm 84
#defining individual parts
##introparts
#introchime
define :introchime do
with_fx :reverb, room: 0.9 do
with_fx :bpf, centre: 100, res: 0, amp: 0, amp_slide: 8 do |a|
use_synth :pulse
use_synth_defaults attack: 0.1, amp: 0.8, cutoff: 40
in_thread do
4.times do
play_pattern_timed [:c6, :e6, :g6, :b6, :c7, :b6, :g6, :e6], [0.125]
end
end
#volume modulation
in_thread do
sleep 0.5
control a, amp: 1
end
end
end
end
#intropad
define :intropad do
with_fx :lpf, cutoff: 30, cutoff_slide: 4 do |c|
use_synth :pulse
use_synth_defaults sustain: 4, release: 2
play_chord [:e3, :g3, :b3]
control c, cutoff: 130
end
end
##first hit parts
#bassattack
define :bassattack do
use_synth :sine
play :c1, sustain: 1, amp: 2, decay: 0.5
end
#firsthitpad
define :firsthitpad do
with_fx :lpf, cutoff: 60 do
use_synth :saw
play_chord [:e2, :e3, :g3, :b3], release: 16, amp: 2
end
end
#firsthitbass
define :firsthitbass do
use_synth :tri
use_synth_defaults sustain: 8, cutoff: 60
play :c1
sleep 8
play :e1
end
##mainloop parts
#pedal 1
define :mainlooppedal1 do
with_fx :lpf, cutoff: 70, cutoff_slide: 4 do |f|
#osc1
in_thread do
live_loop :pedal1 do
with_fx :lpf, cutoff: 80 do
use_synth :saw
use_synth_defaults release: 0.7
play_pattern_timed [:c3, :e3, :g3, :b3, :c4, :b3, :g3, :e3], [0.25]
end
end
end
#osc2
in_thread do
live_loop :pedal2 do
with_fx :lpf, cutoff: 60 do
use_synth :prophet
use_synth_defaults release: 0.7
play_pattern_timed [:c3, :e3, :g3, :b3, :c4, :b3, :g3, :e3], [0.25]
end
end
end
#cutoff modulation
in_thread do
sleep 4
control f, cutoff: 80
sleep 8
control f, cutoff: 100
sleep 28
control f, cutoff: 70
sleep 4
control f, cutoff: 55
sleep 4
control f, cutoff: 30
sleep 4
control f, cutoff: 0
end
end
end
#kick
define :kick1 do
with_fx :lpf, cutoff: 30 do
38.times do
sample :bd_ada, amp: 8
sleep 0.25
sample :bd_ada, amp: 8
sleep 0.75
end
end
end
##secondhit parts
#secondhitchoir
define :secondhitchoir do
with_fx :bpf, centre: 80, res: 0.8 do
use_synth :hollow
use_synth_defaults sustain: 8, release: 4, cutoff: 130, amp: 2
play_chord [:e4, :g4, :b5]
end
end
#secondhitswell
define :secondhitswell do
with_fx :lpf, cutoff: 70 do
use_synth :dsaw
play_chord [:e3, :b3, :e4, :b4], release: 4
end
end
#secondhitbass
define :secondhitbass do
with_fx :reverb, damp: 1 do
with_fx :ixi_techno, cutoff_min: 60, cutoff_max: 80, phase: 8, phase_offset: 0.5 do
use_synth :dsaw
play :e1, sustain: 7, amp: 0.5
end
end
end
##thirdhit parts
#thirdhitbass1
define :thirdhitbass1 do
with_fx :reverb, damp: 1 do
with_fx :ixi_techno, cutoff_min: 60, cutoff_max: 80, phase: 8, phase_offset: 0.5 do
use_synth :dsaw
use_synth_defaults amp: 0.4
play :c1, sustain: 7
sleep 7
play :d1, sustain: 1
sleep 1
play :e1, sustain: 7
sleep 7
play :d1, sustain: 1
sleep 1
play :c1, sustain: 6
sleep 6
play :d1, sustain: 0.75
sleep 0.75
play :c1, sustain: 0.75
sleep 0.75
play :b0, sustain: 4, release: 5
end
end
end
#thirdhitbass2
define :thirdhitbass2 do
with_fx :distortion, distort: 0.95, amp: 0.5 do
with_fx :lpf, cutoff: 60 do
use_synth :piano
play :c1, sustain: 7
sleep 7
play :d1, sustain: 1
sleep 1
play :e1, sustain: 7
sleep 7
play :d1, sustain: 1
sleep 1
play :c1, sustain: 6
sleep 6
play :d1, sustain: 0.75
sleep 0.75
play :c1, sustain: 0.75
sleep 0.75
play :b0, sustain: 4, release: 5
end
end
end
#thirdhitzither
define :thirdhitzither do
with_fx :lpf, cutoff: 80 do
use_synth :chiplead
use_synth_defaults amp: 0.5
play :c3, release: 8
sleep 1
play :c5, release: 7
play :g5, release: 7
end
end
#thirdhitchoir
define :thirdhitchoir do
use_synth :dark_ambience
use_synth_defaults sustain: 2, release: 6
play_chord [:g4, :b4, :g5, :b5]
end
#thirdhitpad
define :thirdhitpad do
with_fx :lpf, cutoff: 75 do
use_synth :dsaw
use_synth_defaults detune: 0.05, attack: 0.5, sustain: 4, release: 4, amp: 2
play_chord [:c3, :g3, :b3, :g4]
sleep 8
play_chord [:b2, :e3, :g3, :g4]
end
end
#thirdhitsweep
define :thirdhitsweep do
with_fx :lpf, cutoff: 90, amp: 0.5 do
use_synth :dsaw
use_synth_defaults detune: 0.05
play :c1, sustain: 5, attack: 2, release: 1
play :c2, sustain: 5, attack: 2, release: 1
sleep 8
play :e1, sustain: 4, attack: 2, release: 1
play :e2, sustain: 4, attack: 2, release: 1
sleep 7
play :d1, sustain: 0.5, attack: 0.5, release: 0.25
play :d2, sustain: 0.5, attack: 0.5, release: 0.25
end
end
##outro
#outropad
define :outropad do
use_synth :hollow
use_synth_defaults res: 0.999, amp: 6
play :c4, attack: 1, sustain: 4.5, release: 2
play :g4, attack: 1, sustain: 4.5, release: 2
sleep 6
play :a4, attack: 1, sustain: 0.5, release: 2
sleep 0.75
play :g4, attack: 1, sustain: 0.5, release: 2
sleep 0.75
play :gb4, attack: 1, sustain: 5.5, release: 5
end
#defining arrangement blocks
#intro
define :intro do
in_thread do
introchime
end
in_thread do
intropad
end
end
#mainloop
define :mainloop do
in_thread do
mainlooppedal1
end
in_thread do
kick1
end
end
#firsthit
define :firsthit do
in_thread do
bassattack
end
in_thread do
firsthitpad
end
in_thread do
firsthitbass
end
end
#secondhit
define :secondhit do
in_thread do
secondhitchoir
end
in_thread do
secondhitbass
end
in_thread do
secondhitswell
end
end
##thirdhit
define :thirdhit do
in_thread do
thirdhitbass1
end
in_thread do
thirdhitbass2
end
in_thread do
thirdhitzither
end
in_thread do
thirdhitchoir
end
in_thread do
thirdhitpad
end
in_thread do
thirdhitsweep
end
end
##outro
define :outro do
outropad
end
#defining arrangement itself
define :arrangement do
intro
in_thread delay: 4 do
mainloop
firsthit
end
in_thread delay: 12 do
secondhit
end
in_thread delay: 20 do
thirdhit
end
in_thread delay: 36 do
outro
end
end
#play whole track
in_thread do
arrangement
end