Skip to content

Instantly share code, notes, and snippets.

@jonmagic
Created October 2, 2014 02:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonmagic/e4be9b7728a312d5e395 to your computer and use it in GitHub Desktop.
Save jonmagic/e4be9b7728a312d5e395 to your computer and use it in GitHub Desktop.
samples = Dir.glob("/Users/jonmagic/Desktop/samples/*.wav")
load_samples samples
define :cry do
sample samples.choose
sleep 1.6
end
define :beat do
sample :loop_compus, attack: 0.01, sustain: 1, release: 0.5
sleep 1.6
end
in_thread(name: :cry) { loop { cry } }
in_thread(name: :beat) { loop { beat } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment