Chord Charter

by Paul Nahay, paul@broadway-performance-systems.com

Introduction

Chord Charter is a Java program that generates formatted musical chord charts, from raw input text provided by the user.

Instructions

1. Run the program.
You will need to have Java 6 installed on your machine. If you don't, you may download and install it for free by clicking here.

Click the "Chord Charter" link at the top of this page to download the Chord Charter program, and either:
  1. OPEN the ChordCharter.jar file directly, or
  2. SAVE the ChordCharter.jar file to your computer, then open the saved file.
2. Optionally, run the demo.
If you want to quickly see what Chord Charter does, just press the Demo button at the bottom right. This will do three things:
  1. Paste the "Star-Spangled Banner" sample input text into the upper text area.
  2. Generate HTML output in the lower text area.
  3. Open the generated HTML output in your system's default browser, for immediate viewing.
3. Enter your original chord chart data into the upper text area.
You may type or paste existing text into the upper text area. Sample data is available to examine or use as a starting point. You may also open an existing text file by pressing the Open Text File button.
4. Generate the HTML.
Press the Generate HTML button. If the input is valid, then the lower text area is filled with the generated HTML data, which may then be copied and pasted into an .htm or .html file. If your input has any errors, the lower text area turns red, and the invalid line and character numbers are displayed, along with the text that the program doesn't understand.
5. Open the generated HTML in your default browser.
Press the Open in Browser button. This will open your default browser with the generated HTML, so you may see the final result. If you know how to manipulate HTML, you may edit the data in the lower text area, and press this button again, to tweak the output. Alternatively, you may press Generate HTML and Open in Browser instead of Steps 4 and 5 above. This has the same effect as pressing the Generate HTML and Open in Browser buttons.
6. Save the generated HTML.
You may save the generated HTML directly to a file by pressing the Save HTML to File button. NOTE: While you may be tempted to save the data from your browser, this is not advisable, as browsers usually alter HTML before saving it, and the HTML so saved is very unlikely to be 100% valid.
7. Quit the program.
Press the Exit button to quit the program.

Input Text

The following describes the data you may enter into the upper text area. Carriage returns in the text are respected, thus bars entered on the same line in the input text will be displayed on the same line in the HTML output.

Chords:
Rests:
Meter Signatures:
Barlines:
Barlines are indicated by the "pipe" vertical line character, together with an optional colon character. The following characters are recognized:
Attributes:
Attribute ExampleExplanation
[title: Happy Talk] Indicates the title of the chord chart, which will be centered at the top of the output.
[subtitle: From "South Pacific"] Indicates one of possibly multiple subtitles, each of which appears on its own line in the output, centered beneath the title.
[composer: Richard Rodgers] Indicates the composer. Is rendered at the top right of the output.
[author: Oscar Hammerstein] Indicates the author or lyricist. Is rendered at the top left of the output.
[copyright: Copyright 1949 by Rodgers and Hammerstein] The copyright notice. Is rendered centered at the bottom of the output.
[first-bar-number: 1] The number of the first bar of the chord chart. If absent, then numbering starts with bar 1. If the music starts with a pickup bar, this value should be set to 0, so that the first full bar becomes bar number 1.
[show-bar-numbers: false] Determines if bar numbers are to be displayed at all. Valid values are true (the default) and false.
[show-sections: false] Determines if section headings are to be displayed at all. Valid values are true (the default) and false.
[section: Verse 2] Defines a named section of music, which starts with a particular bar. It must be placed within the appropriate bar. Is rendered as boxed text above the bar.
[fifths-transposition: 0]

 Transpose by 
The number of fifths by which to transpose the entire chord chart. The default is 0. Transpositions are expressed in fifths, rather than semitones, because semitone transpositions of musical spellings are ambiguous (since multiple enharmonic spellings exist for each pitch class). For example, transposing C up by 1 semitone could result in either C# or Db. However, transposing C up by 7 fifths results in C#, whereas transposing C down by 5 fifths results in Db. You may use the dropdown list at the left to translate a desired musical interval into the number of fifths to enter in the attribute.
[chord-font-size: 12] The font size of the chord symbols, in points. The default is 12.
[line-spacing: 10] The vertical space between the musical systems, in pixels. The default is 0 (i.e., the systems are as close together as possible).
[bar-left: (Piano enters)]
[bar-center: Fermata]
[bar-right: "Oklahoma..."]
Provides an "annotation" for the bar, which appears either left-justified, centered, or right-justified above the bar, according to the attribute name. May be used for performance directions, lyric cues, etc. It must be placed within the appropriate bar. If more than one is present within a bar, only the last one is recognized.
Comments:
Any part of the input text may be surrounded by the C-style multi-line block comment delimiters, /* and */. These delimiters and the text between them are ignored by the program. This is particularly useful for temporarily hiding portions of the input text from the program, without having to actually cut the text out. Nested comments are not recognized. Thus, if the input text contains
/* A /* B */ C */
only
/* A /* B */
gets commented out. The program will attempt to interpret
C */
and will recognize the chord
C
and then fail when it encounters the final
*/