WorkingIdea

Chord.rb

Chord.rb A# Chord.rb is an open-source chord rendering library written in Ruby and RMagick. Originally written for Ukulele/Tom, it should become a general-purpose library for chord rendering.

The original source for Chord.rb is GD-Tab-Ukulele, a Perl module which interacts with GD. I wrote Ukulele/Tom in Ruby with Sinatra, and don't enjoy working with GD, so I wrote an alternative which works with an ImageMagick backend.

On Ukulele/Tom, the code operates as such:

  1. An image tag <img src='/chord/A' />
  2. The controller at /chord/A redirects (with HTTP 200) to the chord image file (served by Nginx if it exists
  3. Otherwise, generate the file, and then redirect to the finished image.
Published Jan 28, 2008 by Tom MacWright