Skip to content

Instantly share code, notes, and snippets.

@LindseyB
Created December 28, 2015 03:14
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 LindseyB/ec51a4144c5cdba31b71 to your computer and use it in GitHub Desktop.
Save LindseyB/ec51a4144c5cdba31b71 to your computer and use it in GitHub Desktop.
# Sonic Pi FizzBuzz by LindseyB
define :fizzbuzz do
sample :elec_fuzz_tom, rate: 1
sample :ambi_soft_buzz, rate: 1
sleep 1
end
define :fizz do
sample :elec_fuzz_tom, rate: 2
sleep 0.5
end
define :buzz do
sample :ambi_soft_buzz, rate: 2
sleep 0.5
end
i = 0
100.times do
if (i%15 == 0)
fizzbuzz
elsif (i%3 == 0)
fizz
elsif (i%5 == 0)
buzz
end
i+=1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment