Skip to content

Instantly share code, notes, and snippets.

@csaunders
Created November 17, 2014 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csaunders/6679538f8820b81fc74a to your computer and use it in GitHub Desktop.
Save csaunders/6679538f8820b81fc74a to your computer and use it in GitHub Desktop.
define :one_up do
use_synth :saw
[:e3, :g3, :e4, :c4, :d4, :g4].each do |n|
play n, release: 0.25
sleep 0.125
end
end
define :powerup do
use_synth :saw
val = 0
1.upto(3) do
[55, 59, 62, 67, 71].each do |n|
play n+val, release: 0.1
sleep 0.0625
end
val = val + 4
end
end
in_thread(name: :main) do
loop do
powerup
sleep 1
one_up
sleep 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment