Skip to content

Instantly share code, notes, and snippets.

@nicoder
Created November 22, 2015 11:43
Show Gist options
  • Save nicoder/e5a74fb9eecf6350eea4 to your computer and use it in GitHub Desktop.
Save nicoder/e5a74fb9eecf6350eea4 to your computer and use it in GitHub Desktop.
use_bpm 240
define :descent do
play_pattern_timed [:e5, :d5, :d5, :d5], 1
play_pattern_timed [:d5, :cs5, :cs5, :cs5], 1
play_pattern_timed [:cs5, :b4, :b4, :b4], 1
end
define :long_note do |note|
play note, release: 2
sleep 4
end
live_loop :metro do
sleep 1
end
live_loop :drums do
sync :metro
sample :bd_haus
with_fx :echo, phase: 0.67 do
sample :bd_haus
end
sample :drum_cymbal_closed if one_in 3
sample :drum_cymbal_hard if one_in 4
sleep 2
end
live_loop :drums do
sync :metro
sleep 1
sample :drum_snare_hard unless one_in 4
sleep 1
end
live_loop :foo do
sync :metro
play :a3
play :e3
end
in_thread(name: :test) do
loop do
play_pattern_timed [:a4, :b4, :cs5, :d5], 1
play_pattern_timed [:e5, :e5, :e5, :e5], 1
2.times do
play_pattern_timed [:fs5, :d5, :a5, :fs5], 1
long_note :e5
end
descent
play_pattern_timed [:a4, :cs5, :e5], [1, 1, 2]
descent
long_note :a4
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment