LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

Rockin' in the Free Software World
Pages: 1, 2, 3, 4, 5

Chordpack

Daniel Polansky's Chordpack is a Perl script that converts a ChordPro input file into a TeX, HTML, or ASCII file. It is also capable of converting ASCII text files to "near-ChordPro" files.



Chordpack is a console application, so we'll take a look at some typical command sequences. These commands take in a file in ChordPro format and create the indicated output file:

[chordpack]$ ./chordpack html SilentNight.chopro > SilentNight.html

[chordpack]$ ./chordpack tex SilentNight.chopro > SilentNight.tex

[chordpack]$ ./chordpack ascii SilentNight.chopro > SilentNight.txt

Users not familiar with the TeX typesetting package may not know how to view a tex file. Assuming a working TeX installation, the viewing procedure is simple: First, convert your tex file to dvi format:

latex SilentNight.tex

This command will automatically create an output file named SilentNight.dvi. You can now view that file in X with the xdvi utility:

xdvi SilentNight.dvi

Other command switches are available for transposing the song during transcription, setting font sizes, and using a song list file. As seen in the illustrations, Chordpack's output is clear and well-formatted (see Figures 1, 2, and 3), and its documentation tells you everything else need to know about the program.

Screen shot.
Figure 1. Chordpack HTML Output.

Screen shot.
Figure 2. Chordpack LaTeX Output.

Screen shot.
Figure 3. Chordpack ASCII Output.

GuitarTeX

Joachim Miltz's GuitarTeX also produces song sheets from files in the Chord or ChordPro formats. The program presents the user with a Perl/Tk graphical interface complete with pull-down menus filled with the various options and parameters for creating the output file -- including options for creating formatted and indexed songbooks. GuitarTeX converts an original ChordPro file to a TeX, PostScript, or Adobe PDF file, and it will also convert a crd file to the ChordPro chopro format. We've already seen some TeX output from Chordpack, so let's take a look at GuitarTeX's PostScript and PDF output.

The GUI is simple to navigate and the program is very easy to use. Open your ChordPro file from File/Open. The display area will fill with the ChordPro format text (Figure 4). Go to File/Export and select PostScript from the submenu: In a few moments, you will have a new file in the PostScript .ps format. Repeat this procedure for creating a PDF file, and that's all there is to converting ChordPro files to PostScript and PDF files.

Screen shot.
Figure 4. GuitarTeX Imports A ChordPro File.

Like Chordpack, GuitarTeX can automatically transpose your song's chords. In Figure 5, we see our example file shifted up to the key of C: The transposition was made by pressing the upward-pointing arrow three times, raising the key-center three half-steps. Thus we moved from the original key of A up to a new key of C. Note that the original directive line {c:key of A} had to be manually edited to accurately reflect the change.

Screen shot.
Figure 5. GuitarTeX Transposition.

You can explore GuitarTeX's other features at your leisure. At this point I must move on to that other ubiquitous notation so familiar to guitarists....

Tablature

Tablature (also just called "tab") is a notation system based on a physical representation of the instrument. Standard guitar tablature uses six horizontal lines to indicate the individual strings of the instrument, while vertical lines demarcate the measure boundaries. A number on a line (string) indicates the fret to be fingered to play the note. Guitar tablature can be edited in any ASCII text editor, like this fragment I whipped up in vi:

               ~ ~ ~
   e e e e e e e e e 
E|-1-----5-7-8-8-8-8-|
B|---3---5-----7-5-7-|
G|-----4-5-----------|
D|-------------------|
A|-------0-----------|
E|-4-----------------|

The numbers on the strings indicate the fret positions for the left-hand fingering. Rhythm is here described using letters to designate the rhythmic unit (here a series of eighth-notes), and special symbols are often employed to indicate a guitar-specific playing technique (in this example the tilde indicates a string bend).

Rhythm indication is one of tablature's weak points. You can notate a passage's general rhythm (as in the example above), but it becomes difficult to show the individual rhythmic activities of interwoven lines of music (counterpoint). Notating rhythm is an option, and many available tabs leave it out; like ChordPro, the tab may assume that the player already has some knowledge of the song's performance factors. Indeed, other aspects of meter and time such as time signatures and tempo are similarly not always specified.

The uppercase letters to the left of each line indicate the tuning of the guitar from the lowest string to the highest (from the bottom of the tab to the top). Our example is in standard tuning (E A D G B E), but tab is an superb system for notating guitar music in altered tunings: Simply tune up according to the string labels, follow the tab fingerings, and the music plays itself. Well, that's the theory anyway. All too frequently I discover that there seems to be something wrong with my guitar....

Like ChordPro, tablature is an excellent medium for Internet file exchange. The alt.guitar.tab and rec.music.makers.guitar.tablature newsgroups are excellent resources for learning more about tablature, for finding tab files, and for posting your own tabs. Tablature files are also found on music fan sites and Web pages devoted to song collections by particular artists.

Pages: 1, 2, 3, 4, 5

Next Pagearrow




Tagged Articles

Be the first to post this article to del.icio.us

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com