Created
December 28, 2015 03:14
-
-
Save LindseyB/ec51a4144c5cdba31b71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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