Skip to content

Instantly share code, notes, and snippets.

@emmasteimann
Forked from jwelshiv/gist:5240230
Created March 26, 2013 00:49
Show Gist options
  • Select an option

  • Save emmasteimann/5242242 to your computer and use it in GitHub Desktop.

Select an option

Save emmasteimann/5242242 to your computer and use it in GitHub Desktop.

Revisions

  1. James Welsh created this gist Mar 25, 2013.
    26 changes: 26 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #!/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