-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrs_jp.rb
158 lines (138 loc) · 2.54 KB
/
rs_jp.rb
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
# theme interpretation of a "conventional" rock song
# SonicPi version: https://soundcloud.com/open_horse_music/blackminded-rsjp-vague-sonic-pi-interpretation-v2
tick = 1.0
half = 0.5*tick
quart = 0.25*tick
length = 32*tick
in_thread(name: :letsgetloud) do
sync :frame
sleep length
loop do
drums_please_get_loud
end
end
define :permanent_drumset do
length.to_i.times.each_with_index do |_, i|
sample :drum_cymbal_closed
sleep tick
end
end
define :drums_please_get_loud do
length.to_i.times.each_with_index do |_, i|
with_fx :level, amp: 2.0 do
sample :drum_bass_hard
sleep half
sample :drum_snare_hard
sample :drum_cymbal_hard if i % 8 == 3
sleep half
end
end
end
define :monolithic_pattern do
4.times do
[:a3, :cs4, :a4, :cs4].each do |note|
play note
sleep quart
end
end
2.times do
[:ab3, :cs4, :ab4, :cs4].each do |note|
play note
sleep quart
end
end
1.times do
[:ab3, :cs4, 66, :cs4].each do |note|
play note
sleep quart
end
end
1.times do
[56, :cs4, 65, :cs4].each do |note|
play note
sleep quart
end
end
4.times do
[57, :d3, 66, :d3].each do |note|
play note
sleep quart
end
end
4.times do
[54, :b2, 66, :b2].each do |note|
play note
sleep quart
end
end
end
in_thread(name: :the_red_line) do
sync :frame
loop do
with_synth :sine do
monolithic_pattern
end
end
end
in_thread(name: :groll) do
sync :frame
sleep 16*tick
loop do
sleep 12*tick
with_fx :level, amp: 2.0 do
with_synth(:fm) do
with_fx(:distortion) do
4.times do
play 54.0
sleep quart
play :b2
sleep quart
#play 66.0
sleep quart
play :b2
sleep quart
end
end
end
end
end
end
in_thread(name: :screaming_git) do
sync :frame
sleep 48*tick
loop do
with_fx :level, amp: 0.4 do
with_synth(:pulse) do
with_fx(:distortion) do
monolithic_pattern
end
end
end
end
end
in_thread(name: :supportive) do
sync :frame
sleep 16*tick
loop do
with_synth(:fm) do
monolithic_pattern
end
end
end
in_thread(name: :supportive_dist) do
sync :frame
sleep 64*tick
loop do
with_synth(:fm) do
with_fx(:distortion) do
monolithic_pattern
end
end
end
end
in_thread(name: :frame) do
cue :frame
loop do
permanent_drumset
end
end