Skip to content

Instantly share code, notes, and snippets.

@stetro
Created December 28, 2015 18:30
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 stetro/e8fb665b2240c802e41a to your computer and use it in GitHub Desktop.
Save stetro/e8fb665b2240c802e41a to your computer and use it in GitHub Desktop.
"Qi" by PHILDEL - Sonic Pi
# "Qi" by PHILDEL
shift = 0
intervals_major = [4, 7, 12, 16, 19, 24, 19, 16, 26, 19, 16, 28]
intervals_minor = [3, 7, 12, 15, 19, 24, 19, 15, 26, 19, 15, 27]
minor = false
live_loop :accord do
intervals = minor ? intervals_minor : intervals_major
intervals.each do |k|
play 45+k+shift
sleep 0.2
end
shift = minor ? (shift + 3) % 12 : (shift + 4) % 12
minor= !minor
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment