Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
abc.rb is a Ruby library for working with music notation in the abc format
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
script
spec
test
.gitignore
History.txt
Manifest.txt
PostInstall.txt
README.textile
Rakefile

README.textile

abc.rb

abc is a Ruby library for working with music notation in the abc format.

Installation

abc.rb relies on the following dependencies;

  • abcm2ps a command line library for converting abc notation into traditional music representation on a stave in postscript format.
  
    wget http://moinejf.free.fr/abcm2ps-5.9.3.tar.gz
    tar -xzf abcm2ps-5.9.3.tar.gz
    cd abcm2ps-5.9.3
    make
    sudo make install
  
  • ghostscript an interpreter for the postscript language, we use it to transform the postscript file into a format that is easier for the web.

Example usage 0.0.1


Abc.to_png "KitchenGirl", kitchen_girl = <<-SRC
    M:4/4
    O:I
    R:R

    X:1
    T:Untitled Reel
    C:Trad.
    K:D
    eg|a2ab ageg|agbg agef|g2g2 fgag|f2d2 d2:|\
    ed|cecA B2ed|cAcA E2ed|cecA B2ed|c2A2 A2:|
    K:G
    AB|cdec BcdB|ABAF GFE2|cdec BcdB|c2A2 A2:|

    X:2
    T:Kitchen Girl
    C:Trad.
    K:D
    [c4a4] [B4g4]|efed c2cd|e2f2 gaba|g2e2 e2fg|
    a4 g4|efed cdef|g2d2 efed|c2A2 A4:|
    K:G
    ABcA BAGB|ABAG EDEG|A2AB c2d2|e3f edcB|ABcA BAGB|
    ABAG EGAB|cBAc BAG2|A4 A4:|
    SRC
Something went wrong with that request. Please try again.