Skip to content

Instantly share code, notes, and snippets.

@benjaminws
Created December 31, 2018 23:49
Show Gist options
  • Save benjaminws/2d08ee7df4118b9d46389b6823045038 to your computer and use it in GitHub Desktop.
Save benjaminws/2d08ee7df4118b9d46389b6823045038 to your computer and use it in GitHub Desktop.
someone discovered sonic-pi
use_debug true
use_bpm 140
use_synth :piano
define :song_structure do |i|
1.times { i.call }
end
# Piano Trebel
in_thread do
intro = -> {
play_pattern_timed([:a5,:f5,:a5,:f5,:b5,:g5,:b5,:g5,:c6,:a5,:c6,:a5,:d6,:b5,:d6,:b5], [0.25])
}
song_structure(intro)
end
# Piano Bass
in_thread do
intro = -> {
play_pattern_timed([:rest,:rest,:a0,:rest,:a1,:rest,:a0,:rest,:bf1,:rest,:bf2,:rest,:b1,:rest,:b2], [0.25])
}
song_structure(intro)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment