Skip to content

Instantly share code, notes, and snippets.

@klahrich
Last active April 19, 2017 03:15
Show Gist options
  • Save klahrich/5a98b0f78671e1efc75953d9354a03fa to your computer and use it in GitHub Desktop.
Save klahrich/5a98b0f78671e1efc75953d9354a03fa to your computer and use it in GitHub Desktop.
use_bpm 80
k = 0
k2 = 0
beat_duration = 1
live_loop :main do
sleep beat_duration.to_f/2
k2 = k2 + 1
if k2 == 2 then
k = k + 1
k2 = 0
end
end
##################
### Drum bass hard
loop0 = Hash.new(){}
loop0[:hits] = [true, false, false, false,
true, false, true, false,
true, false, false, false,
false, false, false, false].ring
loop0[:beats]=4
live_loop :loop0 do
sync :main
with_fx :distortion do
loop0[:hits].length.times do |i|
sample :drum_bass_hard, cutoff:130 - (i/4)*20 if loop0[:hits].tick && k < 32
sleep beat_duration * loop0[:beats] / loop0[:hits].length.to_f
end
end
end
###################
### Drum snare hard
loop1 = Hash.new(){}
loop1[:hits] = [false, false, false, true,
false, false, false, false,
false, false, false, false,
true, false, false, false].ring
loop1[:beats]=4
live_loop :loop1 do
sync :main
with_fx :echo, phase:0.25, mix:0.125 do
with_fx :krush do
with_fx :distortion, amp:5 do
loop1[:hits].length.times do
sample :drum_snare_hard, cutoff:[130, 100].ring.look if loop1[:hits].tick && k < 32
sleep beat_duration * loop1[:beats] / loop1[:hits].length.to_f
end
end
end
end
end
####################
### Distorted cymbal
loop2 = Hash.new(){}
loop2[:hits] = [true, true, false, false,
false, false, false, false,
false, true, true, false,
false, false, true, false].ring
loop2[:beats]=4
live_loop :loop2 do
sync :main
with_fx :echo, phase:0.25, mix:0.125 do
with_fx :krush do
with_fx :distortion, amp:5 do
loop2[:hits].length.times do
sample :drum_cymbal_closed, cutoff:[130, 100, 70, 70].ring.look if loop2[:hits].tick && k < 32
sleep beat_duration * loop2[:beats] / loop2[:hits].length.to_f
end
end
end
end
end
###############################
### Regular cymbal, faster pace
loop3 = Hash.new(){}
loop3[:hits] = [true, true, false, true,
true, false, true, true,
true, true, false, true,
true, false, true, true].ring
loop3[:cutoffs] = [70, 100, 0, 100,
110, 0, 90, 100,
70, 90, 0, 100,
90, 0, 80, 90].ring
loop3[:beats]=2
live_loop :loop3 do
sync :main
loop3[:hits].length.times do
hit = loop3[:hits].tick
c = loop3[:cutoffs].look
sample :drum_cymbal_closed, cutoff:c if hit && k < 32
sleep beat_duration * loop3[:beats] / loop3[:hits].length.to_f
end
end
###############################
### vrrrrrroaaaaaaaaaaaaaaaaaa3
loop4 = Hash.new(){}
live_loop :loop4 do
sync :main
if k >= 8 && k < 30 then
with_fx :krush do
synth :piano, note: :C3, attack:1, sustain:1, decay:1, amp:1
synth :piano, note: :G2, attack:1, sustain:1, decay:1, amp:1
synth :pluck, note: :C3, attack:1, sustain:1, decay:1, amp:1
synth :tb303, note: :C3, attack:1, sustain:0.5, decay:0.5, amp:0.75, cutoff:rrand_i(80,100)
sleep 4
end
end
end
###############################
### cringy melody
loop5 = Hash.new(){}
loop5[:hits] = [true, true, false, true,
true, false, true, true,
true, true, false, true,
true, false, true, true].ring
loop5[:notes] = [:C4, :C4, :Cs4, :C4,
:Cs4, :C4, :Cs4, :C4,
:Ds4, :Ds4, :E4, :Ds4,
:G4, :E4, :Ds4, :Cs4
].ring
loop5[:beats]=8
live_loop :loop5 do
sync :main
if k >= 8 && k < 30 then
with_fx :krush, gain:4 do
with_fx :echo, phase:0.25, mix:0.5 do
loop5[:notes].length.times do
synth :piano, note: loop5[:notes].tick, amp:1, attack:0.25 if k < 30
sleep beat_duration * loop5[:beats] / loop5[:notes].length.to_f
end
end
end
end
end
live_loop :loop5b do
sync :main
if k == 32 - 8 then
with_fx :distortion do
sample :ambi_dark_woosh, rate:0.3, amp:2, sustain:3, decay:1
sleep 0.25
sample :ambi_dark_woosh, rate:0.25, sustain:4, amp:1.25
end
end
end
###############################
### tata tata ta
loop6 = Hash.new(){}
loop6[:hits] = [true, true, false, false,
true, false, false, false,
true, false, false, false,
true, false, false, false,
false, false, true, false,
true, false, false, false,
true, true, false, false,
false, false, false, false].ring
loop6[:amps] = [1.0, 0.25, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0,
1.0, 1.0, 0.25, 1.0,
1.0, 1.0, 0.5, 1.0,
1.0, 0.25, 1.0, 1.0,
1.0, 1.0, 1.0, 1.0].ring
loop6[:beats]=2
live_loop :loop6 do
sync :main
if k == 30 then
with_fx :krush, gain:1.2 do
loop6[:hits].length.times do |i|
print loop6[:hits].length
print i
#with_fx :echo, phase:1, mix:0.5 do
hit = loop6[:hits].tick
a = loop6[:amps].look
sample :drum_snare_hard, amp:5*a if hit
sample :bass_drop_c, sustain:0.25, decay: i==loop6[:hits].length ? 0.15 : 0.05, amp:1*a if hit
sample :ambi_lunar_land, sustain:0.15, rate:0.6, amp:1*a if hit
sleep beat_duration * loop6[:beats] / loop6[:hits].length.to_f
end
#end
end
end
end
###############################
### boumboum boumboum
loop7 = Hash.new(){}
loop7[:hits] = [true, true, true, false,
true, false, true, false,
false, false, true, false,
false, false, false, false,
true, true, true, false,
false, false, true, true,
true, false, true, false,
false, false, false, false
].ring
loop7[:amps] = [0.25, 0.5, 0.75, 1,
0.5, 0.7, 1, 1,
1, 1, 0.5, 1,
1, 1, 1, 1,
0.25, 0.5, 1, 1,
0.25, 0.25, 0.25, 0.125,
1, 1, 0.25, 0.25,
1, 1, 1, 1].ring
loop7[:cutoffs] = [130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 120, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,].ring
loop7[:beats]=4
live_loop :loop7 do
sync :main
if k >= 32 then
with_fx :distortion do
loop7[:hits].length.times do
hit = loop7[:hits].tick
a = loop7[:amps].look
c = loop7[:cutoffs].look
sample :drum_bass_hard, amp:a, cutoff:c if hit
sleep beat_duration * loop7[:beats] / loop7[:hits].length.to_f
end
end
end
end
###############################
### rythmic tactac
loop8 = Hash.new(){}
loop8[:hits] = [true, true, true, false,
true, false, true, false,
false, false, true, false,
false, false, false, false,
false, true, true, false,
false, false, true, true,
true, false, true, false,
false, false, false, false
].ring
loop8[:amps] = [0.25, 0.5, 0.75, 1,
0.5, 0.7, 1, 1,
1, 1, 0.5, 1,
1, 1, 1, 1,
0.25, 0.5, 1, 1,
0.25, 0.25, 0.25, 0.125,
1, 1, 0.25, 0.25,
1, 1, 1, 1].ring
loop8[:cutoffs] = [130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 120, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,].ring
loop8[:beats]=4
live_loop :loop8 do
sync :main
if k >= 32 then
with_fx :distortion do
loop8[:hits].length.times do
hit = loop8[:hits].tick
a = loop8[:amps].look
c = loop8[:cutoffs].look
sample :drum_snare_soft, amp:a, cutoff:c, attack:0.15, sustain:0.15, rate:0.96 if hit
sleep beat_duration * loop8[:beats] / loop8[:hits].length.to_f
end
end
end
end
###############################
### rythmic tictic cymbal
loop9 = Hash.new(){}
loop9[:hits] = [true, true, true, false,
true, false, true, false,
true, false, false, false,
true, false, true, true,
true, true, false, false,
true, false, true, false,
true, false, false, false,
true, false, true, false
].ring
loop9[:amps] = [0.25, 0.5, 0.75, 0.25,
0.5, 0.7, 1, 1,
1, 1, 0.5, 1,
0.5, 1, 0.25, 0.5,
0.25, 0.5, 1, 1,
0.25, 0.25, 0.25, 0.125,
1, 1, 0.25, 0.25,
0.25, 1, 0.5, 1].ring
loop9[:cutoffs] = [130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 120, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130].ring
loop9[:beats]=4
live_loop :loop9 do
sync :main
if k >= 32 then
#with_fx :distortion do
loop9[:hits].length.times do
hit = loop9[:hits].tick
a = loop9[:amps].look
c = loop9[:cutoffs].look
sample :drum_cymbal_closed, amp:a, cutoff:c, attack:0.10, sustain:0.13, rate:0.96 if hit
sleep beat_duration * loop9[:beats] / loop9[:hits].length.to_f
end
#end
end
end
live_loop :loop10 do
sync :main
if k >= 32 then
with_fx :krush, gain:5 do
synth :piano, note: :C2, attack:[1, 1.1, 1.2].choose, sustain:1, decay:[0.75, 0.8, 0.85].choose, amp:2
synth :piano, note: :C3, attack:[0.75, 0.8, 0.85].choose, sustain:1, decay:[0.75, 0.8, 0.85].choose, amp:2
synth :piano, note: :G2, attack:[0.75, 0.8, 0.85].choose, sustain:1, decay:[0.75, 0.8, 0.85].choose, amp:2
sleep 4
end
end
end
###############################
### rythmic tictic cymbal
loop11 = Hash.new(){}
loop11[:notes] = [:rest, :C4, :rest, :rest,
:rest, :G4, :rest, :rest,
:rest, :rest, :F4, :rest,
:Gs4, :G4, :rest, :rest,
:rest, :C5, :rest, :rest,
:rest, :G4, :rest, :rest,
:rest, :rest, :Ds4, :rest,
:G4, :D4, :rest, :rest].ring
loop11[:notes2] = [:rest, :C3, :rest, :rest,
:rest, :G3, :rest, :rest,
:rest, :rest, :F3, :rest,
:Gs3, :G3, :rest, :rest,
:rest, :C4, :rest, :rest,
:rest, :G3, :rest, :rest,
:rest, :rest, :Ds3, :rest,
:G3, :D3, :rest, :rest].ring
loop11[:notes3] = [:rest, :C4, :rest, :rest,
:rest, :G4, :rest, :rest,
:rest, :rest, :F4, :rest,
:Gs4, :G4, :rest, :rest,
:rest, :C5, :rest, :rest,
:rest, :G4, :rest, :rest,
:rest, :rest, :Ds4, :rest,
:G4, :D4, :rest, :rest].ring
loop11[:cutoffs] = [130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 120, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130].ring
loop11[:beats]=8
live_loop :loop11 do
sync :main
if k >= 48 then
with_fx :distortion do
with_fx :slicer, amp_min:0.5, amp_max:0.75, wave:3, phase:0.5, mix:0.75, amp:2 do
loop11[:notes].length.times do
n = loop11[:notes].tick
c = loop11[:cutoffs].look
n2 = loop11[:notes2].look
n3 = loop11[:notes3].look
with_fx :krush, gain:1.25 do
#synth :hollow, note:n, cutoff:c, attack:1, decay:0.55, sustain:0.5, release:1.5
#synth :pluck, note:n, cutoff:c, attack:0.3, decay:0.15, sustain:0.3, release:1, amp:1
synth :piano, note:n, cutoff:120, attack:0.75, decay:0.15, sustain:0.25, release:1.5, amp:1.0
#synth :dark_ambience, note:n2, cutoff:c, attack:0.15, decay:0.20, sustain:0.5, release:0.5, amp:5
synth :dark_ambience, note:n3, cutoff:c, attack:0.15, decay:0.20, sustain:0.5, release:0.5, amp:3
#synth :bnoise, note: :C3, cutoff:c, attack:0.15, decay:0.20, sustain:0.5, release:0.5, amp:4
synth :dark_ambience, note:n, cutoff:c, attack:0.05, decay:0.20, sustain:0.5, release:0.5, amp:2
end
#with_fx :distortion do
# synth :blade, note:n, cutoff:100, attack:0.5, decay:0.15, sustain:0.25, release:0.25, amp:0.20
#end
sleep beat_duration * loop11[:beats] / loop11[:notes].length.to_f
end
end
end
end
end
###############################
### rythmic tictic cymbal
loop12 = Hash.new(){}
loop12[:hits] = [true, false, true, false,
true, false, true, false,
true, false, true, false,
true, false, true, true,
true, false, true, false,
true, false, true, false,
true, false, true, false,
true, false, true, false
].ring
loop12[:amps] = [0.25, 0.5, 0.75, 0.25,
0.5, 0.7, 1, 1,
1, 1, 0.5, 1,
0.5, 1, 0.25, 0.5,
0.25, 0.5, 1, 1,
0.25, 0.25, 0.25, 0.125,
1, 1, 0.25, 0.25,
0.25, 1, 0.5, 1].ring
loop12[:cutoffs] = [130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 120, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130,
130, 130, 130, 130].ring
loop12[:beats]=4
live_loop :loop12 do
sync :main
if k >= 48 then
with_fx :distortion do
loop12[:hits].length.times do
hit = loop12[:hits].tick
a = loop12[:amps].look
c = loop12[:cutoffs].look
sample :ambi_haunted_hum, rate:0.75, sustain:0.25, release:0.15 if hit
sleep beat_duration * loop12[:beats] / loop12[:hits].length.to_f
end
end
end
end
###############################
### rythmic tictic cymbal
loop13 = Hash.new(){}
live_loop :loop13 do
sync :main
if k >= 48 then
with_fx :distortion do
sample :bd_fat, amp:5
sample :bass_thick_c, rate:0.5, sustain:2, release:1, amp:3
sample :ambi_dark_woosh, rate:0.35, cutoff:100, start:0.5, amp:3
sleep 8
end
end
end
###############################
### rythmic tictic cymbal
live_loop :loop14 do
sync :main
if k == 44 then
with_fx :distortion do
s = sample :ambi_dark_woosh, rate:0.5, sustain:2, release:1, amp:0, amp_slide:4
control s, amp:3
sleep 8
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment