Skip to content

Instantly share code, notes, and snippets.

@daniellockard
Created August 19, 2011 17:06
Show Gist options
  • Save daniellockard/1157362 to your computer and use it in GitHub Desktop.
Save daniellockard/1157362 to your computer and use it in GitHub Desktop.
This plays the mario underworld theme
#!/usr/bin/env ruby
require 'bloops'
b = Bloops.new
b.tempo = 100
s1 = b.sound Bloops::SQUARE
b.tune s1, "-- 16:C + 16:C - 16:A + 16:A - 16:B + 16:B 2 4 - 16:C + 16:C - 16:A + 16:A - 16:B + 16:B 2 4 - 16:F + 16:F - 16:D + 16:D - 16:E + 16:E 2 4 - 16:F + 16:F - 16:D + 16:D - 16:E + 16:E 2 2 32:E 32:D 32:C# 8:C 8:E 8:D - 8:G# 8:F + 8:C# 32:C 32:F# 32:F 32:E 32:B 32:A 16:G# 16:E - 16:B 16:A# 16:A 16:G#"
b.play
sleep 1 while !b.stopped?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment