Skip to content

Instantly share code, notes, and snippets.

@emmasteimann
Forked from jwelshiv/gist:5240230
Created March 26, 2013 00:49
Show Gist options
  • Save emmasteimann/5242242 to your computer and use it in GitHub Desktop.
Save emmasteimann/5242242 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
# brew install portaudio
# gem install bloopsaphone
require 'bloops'
# the bloops o' phone
bloops = Bloops.new
bloops.tempo = 150
# beats
simpsons = bloops.sound Bloops::SQUARE
# Simpsons
bloops.tune simpsons, "32 + C E F# 8:A G E C - 8:A 8:F# 8:F# 8:F# 2:G"
input = ARGV[0] || 'heroku logs --tail --app dev-instacanvas'
matcher = ARGV[1] || '/my-cart/complete'
IO.popen(input) do |io|
io.each do |out|
if out.match matcher
bloops.play
puts out
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment