| ChordPro(3pm) | User Contributed Perl Documentation | ChordPro(3pm) |
ChordPro - A lyrics and chords formatting program
perl -MChordpro -e run -- [ options ] [ file ... ]
When the associated chordpro program has been installed correctly:
chordpro [ options ] [ file ... ]
chordpro will read one or more text files containing the lyrics of one or many songs plus chord information. chordpro will then generate a photo-ready, professional looking, impress-your-friends sheet-music suitable for printing on your nearest printer.
Typical ChordPro input:
{title: Swing Low Sweet Chariot}
{subtitle: Traditional}
{start_of_chorus}
Swing [D]low, sweet [G]chari[D]ot,
Comin' for to carry me [A7]home.
Swing [D7]low, sweet [G]chari[D]ot,
Comin' for to [A7]carry me [D]home.
{end_of_chorus}
# Verse
I [D]looked over Jordan, and [G]what did I [D]see,
Comin' for to carry me [A7]home.
A [D]band of angels [G]comin' after [D]me,
Comin' for to [A7]carry me [D]home.
{c: Chorus}
chordpro is a rewrite of the Chordii program.
For more information about the ChordPro file format, see <https://www.chordpro.org>.
This option may be specified more than once. Each additional config file overrides the corresponding definitions that are currently active.
The CSV has the same name as the PDF, with extension ".pdf" replaced by ".csv".
WHICH can be "all" to print all chords used, "user" to only print the user-defined chords, and "none" to suppress printing of chord diagrams.
This option may be specified multiple times.
Song file names listed on the command line are processed after the files from the filelist arguments.
Useful to make prints for singers and other musicians that do not require chords.
This makes it more convenient to process ChordPro files have custom directives.
The filename extension determines the type of the output. It should correspond to one of the backends that are currently supported:
This is enabled by default. See also --nostrict.
If specified and a table of contents is requested, a nice coverpage will be added.
By default a table of contents is included in the PDF output when it contains more than one song.
The following Chordii command line options are recognized. Note that not all of them actually do something.
Options marked with * are better specified in the config file.
Note: Chordii used the term _grid_ for chord diagrams. It should not be confused with ChordPro grids.
FONT can be either a full path name to a TrueType font file, or the name of one of the standard fonts. See section "FONTS" for more details.
FONT can be either a full path name to a TrueType font file, or the name of one of the standard fonts. See section "FONTS" for more details.
See ChordPro::Config for details about the configuration files.
Note that missing default configuration files are silently ignored. Also, chordpro will never create nor write configuration files.
The default system config file depends on the operating system and user environment. A common value is "/etc/chordpro.json" on Linux systems.
This is the place where the system manager can put settings like the paper size, assuming that all printers use the same size.
The default user config file depends on the operating system and user environment. Common values are "$HOME/.config/chordpro/chordpro.json" and "$HOME/.chordpro/chordpro.json", where $HOME indicates the user home directory.
Here you can put settings for your preferred fonts and other layout parameters that you want to apply to all chordpro runs.
Default is a file named "chordpro.json" in the current directory.
Here you can put settings that apply to the files in this directory only.
You can specify multiple config files. The settings are accumulated.
--define may be used multiple times to set multiple items.
This guarantees that the program is running with the default configuration.
The config contains most of the ChordPro configuration items, all commented out. It is easy to get started with configuring ChordPro by enabling and modifyng just a few items at a time.
The default configuration is commented to explain its contents.
The specified config file is loaded and immedeately written out in standard format, including schema comments. After this, the program exits. No songs are processed.
Output goes to standard output unless `--output` is used to specify an alternative.
All other options are ignored.
There are two ways to specify fonts: with a font filename, and a built-in font name.
A font filename must be either and absolute filename, or a relative filename which is interpreted relative to the font path, which consists of configuration setting "fontdir", the "fonts" resource dir, and the contents of environment variable "FONTDIR". In any case, the filename should point to a valid TrueType (".ttf") or OpenType (".otf") font.
If it is not a filename, it must be the name one of the built-in PDF core fonts:
Courier Symbol Courier-Bold Times-Bold Courier-BoldOblique Times-BoldItalic Courier-Oblique Times-Italic Helvetica Times-Roman Helvetica-Bold ZapfDingbats Helvetica-BoldOblique Helvetica-Oblique
Why a rewrite of Chordii?
Chordii is the de facto reference implementation of the ChordPro file format standard. It implements ChordPro version 4.
ChordPro version 5 adds a number of new features, and this was pushing the limits of the very old program. Unicode support would have been very hard to add, and the whole program centered around PostScript generation, while nowadays PDF would be a much better alternative.
So I decided to create a new reference implementation from the ground up. I chose a programming language that is flexible and very good at handling Unicode data. And that is fun to program in.
This program implements ChordPro version 5. It supports most of the features of Chordii, and a lot more:
* Native PDF generation
* Unicode support (all input is UTF8)
* User defined chords and tuning, not limited to 6 strings.
* Support for Nashville Numbering and Roman Numbering.
* Support for external TrueType and OpenType fonts
* Font kerning (with external TrueType fonts)
* Fully customizable layout, fonts and sizes
* Customizable backends for PDF, ChordPro, LilyPond*, LaTeX* and HTML*.
(* = under development)
Johan Vromans "<jv at CPAN dot org >"
ChordPro (the program) development is hosted on GitHub, repository <https://github.com/ChordPro/chordpro>.
Please report any bugs or feature requests to the GitHub issue tracker, <https://github.com/ChordPro/chordpro/issues>.
A user community discussing ChordPro can be found at <https://groups.google.com/forum/#!forum/chordpro>.
Copyright (C) 2010,2018 Johan Vromans,
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 2025-02-22 | perl v5.40.1 |