Created
October 4, 2015 20:00
-
-
Save lwrubel/fc9d3192fb5573756fd5 to your computer and use it in GitHub Desktop.
Plain Bob Minor (6 bells)
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
# Plain Bob Minor (6 bells) | |
use_synth :dull_bell | |
bells = [:A5, :G5, :F5, :E5, :D5, :C5] | |
define :round do |c| | |
4.times do |row| | |
puts "Round #{row}" | |
for i in 0..5 | |
play bells[i], release: 2 | |
sleep 0.3 | |
end | |
sleep 0.05 | |
end | |
end | |
define :row do |c| | |
for i in 0..5 | |
play c[i], release: 2 | |
sleep 0.3 | |
end | |
sleep 0.05 | |
end | |
# 1 & 6 stay same | |
define :pswitch do |m| | |
puts "p switch" | |
m.insert(1,m.delete_at(2)) | |
m.insert(3,m.delete_at(4)) | |
row m | |
end | |
# 1 & 2 stay same | |
define :qswitch do |m| | |
puts "q switch" | |
m.insert(2,m.delete_at(3)) | |
m.insert(4,m.delete_at(5)) | |
row m | |
end | |
# all pairs cross | |
define :rswitch do |m| | |
puts "r switch" | |
m.insert(0,m.delete_at(1)) | |
m.insert(2,m.delete_at(3)) | |
m.insert(4,m.delete_at(5)) | |
row m | |
end | |
#start ringing | |
round bells | |
5.times do | |
5.times do | |
rswitch bells | |
pswitch bells | |
end | |
rswitch bells | |
qswitch bells | |
end | |
round bells |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment