First, here's a sample output and the chopro source to generate it.
Seems cool? Try it! Here's the source and revision history. To use it, you will need Python and the reportlab python package. Chordlab is free software.
The chopro format
The chopro format is a pseudo-standard
format for song lyrics with chords. The basic format is simply plain
text with chords in brackets. Some extra markup is added in braces, in
the form {keyword: value}
, where the :
value
part is only relevant for some keywords.
A common example may look like this:
{title: Yesterday}
{subtitle: Beatles}
{define: C/G base-fret 0 frets 3 3 2 0 1 0}
[G]Yesterday[F#m], all my [B7]troubles seemed so [Em]far away
[C]Now it [D]looks as though there [C]here to [G]stay
...
Why chordlab?
Once upon a time there was a program named
chord. It did approximately what this page
describes. It wasn't perfect or bug-free, but it existed and kind of
worked.
Now I tried to install chord on my new
Ubuntu laptop. There was no "chord" in the
package system.
So I googled. As far as I can tell, the program doesn't exist outside of
the FreeBSD port/package collection, which has kept an old snapshot.
Since I had other reasons to learn python (mainly to be able to help
Katy, who takes a course in it), I saw this as a convenient example and
dug in.
After very few hours I had a working program. I think that gives good credit both to the python programming language and to the reportlab package.
I don't claim chordlab to be perfect or bug-free either, but it exists. Now I can continue making it better until it is perfect.
Skriv en kommentar
Din epostadress kommer inte att visas. Du kan inte använda markup i kommentaren, men en dubbel radmating blir en styckesbrytning.