Skip to content

Instantly share code, notes, and snippets.

@kn1kn1
Created July 3, 2017 13:03
Show Gist options
  • Save kn1kn1/f6623d02e1e9913fdcfac89212bf52e9 to your computer and use it in GitHub Desktop.
Save kn1kn1/f6623d02e1e9913fdcfac89212bf52e9 to your computer and use it in GitHub Desktop.
# bc.rb
# https://soundcloud.com/kn1kn1/bcrb
use_bpm 95
in_thread do
loop do
sync :ddd
sample :bd_klub, rate: 1 - 0.25, amp: 5
sleep 0.5
sample :bd_klub, rate: 1 - 0.25, amp: 5
sleep 0.5
sample :elec_blup, rate: 2, amp: 1
sleep 3
end
end
in_thread do
loop do
sync :lp
4.times do
ratio = [0, -5, -2, -7].ring.tick
r = pitch_to_ratio(ratio)
with_fx :reverb, room: 0.9 do
sample :ambi_piano, amp: 4, rate: r
end
sleep 8
end
end
end
in_thread do
with_fx :reverb do
loop do
sync :chor
ratio = [-5, -2, 0, 3].choose
print ratio
ambi_rate = 0.5 * pitch_to_ratio(ratio)
print ambi_rate
ratio = [-5, -2, 0, 3].choose
print ratio
ambi_rate2 = 0.5 * 0.5 * pitch_to_ratio(ratio)
print ambi_rate2
8.times do
sample :ambi_choir, rate: ambi_rate, pan: rrand(-1, 1), amp: 0.5
sample :ambi_choir, rate: ambi_rate2, pan: rrand(-1, 1), amp: 2
sleep 1
end
end
end
end
# main
with_fx :rlpf, cutoff: 80, cutoff_slide: 1 do |c|
cutoff = 80
8.times do
cue :chor
2.times do
cue :ddd
control c, cutoff: cutoff, cutoff_slide: rrand(1, 4)
sample :loop_amen, amp: 2, beat_stretch: 4
sleep 4
end
cutoff += 5
end
cutoff = 80
control c, cutoff: cutoff
cue :lp
8.times do
cue :ddd
sleep 4
end
cue :lp
4.times do |i|
2.times do
cue :ddd
control c, cutoff: cutoff, cutoff_slide: rrand(1, 4)
sample :loop_amen, amp: 2, beat_stretch: 4
sleep 4
end
cutoff += 10
end
cutoff = 80
control c, cutoff: cutoff
4.times do
2.times do
cue :ddd
control c, cutoff: cutoff, cutoff_slide: rrand(1, 4)
sample :loop_amen, amp: 2, beat_stretch: 4
sleep 4
end
cutoff += 10
end
cutoff = 80
control c, cutoff: cutoff
8.times do
cue :chor
2.times do
cue :ddd
control c, cutoff: cutoff, cutoff_slide: rrand(1, 4)
sample :loop_amen, amp: 2, beat_stretch: 4
sleep 4
end
cutoff += 5
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment