Skip to content

Instantly share code, notes, and snippets.

@RyanScottLewis
Created January 6, 2011 20:50
Show Gist options
  • Select an option

  • Save RyanScottLewis/768557 to your computer and use it in GitHub Desktop.

Select an option

Save RyanScottLewis/768557 to your computer and use it in GitHub Desktop.
my_proj = Project.new do
drum_kit do
kick "kick.wav"
closed_hi_hat "closedhihat.wav"
snare "snare.wav"
end
patterns do
simple do
kick
kick & snare
kick
kick & snare
end
my_cool_beat do
kick & closed_hi_hat
closed_hi_hat
snare & closed_hi_hat
closed_hi_hat
closed_hi_hat
kick & closed_hi_hat
snare & closed_hi_hat
closed_hi_hat
end
end
end
my_proj.drum_kit.kick.play # => Would play "kick.wav"
my_proj.patterns.simple.play # => Would play the pattern "simple" once
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment