Skip to content

Instantly share code, notes, and snippets.

@infovore
Last active August 29, 2015 14:19
Show Gist options
  • Save infovore/b7840eb43d34a2bab3c5 to your computer and use it in GitHub Desktop.
Save infovore/b7840eb43d34a2bab3c5 to your computer and use it in GitHub Desktop.
load_sample :loop_amen
load_sample :bass_dnb_f
with_fx(:rlpf, cutoff: 40, cutoff_slide: 4) do |c|
one_to_eight = (1..8)
live_loop :drums do |count|
if (count+1) % 8 == 0
# put a break in every eight bars where you chop the break randomly
slices = one_to_eight.to_a.sort_by { rand }
else
slices = one_to_eight.to_a
end
slices.each do |slice_int|
duration = 1.0 / 8
slice_start = (slice_int - 1 ) * duration
sample :loop_amen, amp: 5,start: slice_start, finish: slice_start+duration
sleep sample_duration(:loop_amen) / 8
end
control c, cutoff: rrand(70, 120), cutoff_slide: rrand(1, 4)
count += 1
end
live_loop :bass do |count|
sync :drums
if (count+1) % 8 == 0
with_fx :wobble do
sample :bass_dnb_f, amp:5
end
else
sample :bass_dnb_f, amp:5
end
count += 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment