ChordPro(3pm)
πΆ ChordPro(3pm) β the lyrics-and-chords glow-up π
User Contributed Perl Documentation Β· ChordPro(3pm)
okay bestie, buckle UP, because this is the page that teaches you about chordpro: the program that takes your sad little text file of lyrics + chords and turns it into sheet music so pretty people will literally ask you where you got it. π
β¨ NAME β¨
ChordPro β a lyrics and chords formatting program πΈ
β¨ SYNOPSIS β¨
Run it straight through Perl like this:
perl -MChordpro -e run -- [ options ] [ file ... ]
And once the chordpro program itself has been installed the way it's supposed to be, you just go:
chordpro [ options ] [ file ... ]
β¨ DESCRIPTION β¨
So here's the tea π«: chordpro reads one or more text files. Those files contain the lyrics of one song β or like, a whole bunch of songs, no big deal β plus the chord information tucked in next to them.
Then it does its little magic and generates a photo-ready, professional looking, impress-your-friends piece of sheet music. Print it on whatever printer is nearest to you. Obsessed, honestly. π
Here's what typical ChordPro input looks like β this is the standard, no cap:
{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}
See how the chords live inside square brackets right before the syllable they belong to? That's the whole vibe. The directives in curly braces are the structure: title, subtitle, chorus markers, comments, all of it. π¦
Fun fact for the lore girlies: chordpro is a rewrite of the Chordii program. Glow-up of the century, fr fr.
Want more info about the ChordPro file format itself β the whole syntax situation? Go here: <https://www.chordpro.org>. π
β¨ COMMAND LINE OPTIONS β¨
okay bestie, this is the good stuff β every flag you can throw at chordpro and what it actually does π
--about(short:-A) β prints version info about the ChordPro program. That's it, that's the whole job, no other processing happens, it just says hi and dips π--back-matter=FILEβ appends the contents of the named PDF document to the output. perfect if you want some back matter pages at the end π--config=JSON(shorter:--cfg) β a JSON file that defines how the program behaves and how the output gets laid out. see ChordPro::Config for the deets.
you can drop this option more than once, no cap β every additional config file overrides the corresponding definitions that are currently active π₯
--cover=FILEβ prepends the contents of the named PDF document to the output. cover pages, slay β¨
see also --title.
--csvβ when you're generating PDF output, this also writes a CSV file with titles and page numbers. some tools (hi MobileSheets π) can use that CSV to treat the PDF as a collection of independent songs.
the CSV has the same name as the PDF, except the extension .pdf gets replaced by .csv.
--decapoβ eliminates capo settings by transposing the song. bye bye capo π--diagrams=WHICHβ prints diagrams of the chords used in a song.
WHICH can be "all" (print every chord used), "user" (only the user-defined chords), or "none" (suppress chord diagram printing entirely).
--encoding=ENCβ specify the encoding for input files. default isUTF-8. and heads up:ISO-8859.1(Latin-1) encoding is automatically sensed πΈ--filelist=FILEβ read the names of the files to be processed from the named file. sneaky and efficient fr fr.
this option can be specified multiple times.
song file names listed on the command line are processed after the files from the filelist arguments.
--front-matter=FILEβ prepends the contents of the named PDF document to the output. front matter pages, got it π«Ά--lyrics-only(short:-l) β only prints lyrics. all chords are suppressed. very demure.
useful for printing for singers and other musicians who do not require chords.
--no-csvβ suppresses generating the CSV file. see--toc.--no-strictβ enables liberal interpretation of the input with regard to the ChordPro standard. most notably, unknown directives will not be flagged as warnings but silently ignored.
this makes it more convenient to process ChordPro files that have custom directives. live your truth π
--no-tocβ suppresses the table of contents. see--toc.--output=FILE(short:-o) β designates the name of the output file where the results get written to.
the filename extension determines the type of the output, and it should correspond to one of the backends that are currently supported:
pdfβ Portable document format (PDF).txtβ a textual representation of the input, mostly for visual inspection.choβ a functional equivalent version of the ChordPro input.
--start-page-number=N(short:-p) β sets the starting page number for the output.--strictβ requires the input to be strictly compliant to the ChordPro standard.
this is enabled by default. see also --nostrict.
--subtitle=XXXβ subtitle (for songbooks).--title=XXXβ title (for songbooks).
if specified and a table of contents is requested, a nice coverpage will be added β¨
note that --title overrides --cover.
--toc(short:-i) β includes a table of contents.
by default a table of contents is included in the PDF output when it contains more than one song.
--transpose=XX(short:-x) β XX must be a number in the range-24 .. +24, optionally followed by one of"s", or"f".
transposes all songs by the given number of semi-tones. a positive number transposes up, a negative number transposes down.
if the resultant key requires accidentals, the postfix controls whether sharps or flats are used. see the docs π
--version(short:-V) β prints the program version and exits. short and sweet.
π Chordii compatibility options π
the following Chordii command line options are recognized. note that not all of them actually do something π (it's giving legacy support energy).
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. different things, bestie, don't mix them up π«Ά
--text-font=FONT(short:-T) * β sets the font used to print lyrics and comments.
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.
--text-size=N(short:-t) * β sets the font size for lyrics and comments.--chord-font=FONT(short:-C) * β sets the font used to print the chord names.
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.
--chord-size=N(short:-c) * β sets the font size for the chord names.--chord-grid-size=N(short:-s) * β sets the total width of a chord diagram.--chord-gridsβ prints chord diagrams of all chords used in a song.--no-chord-grids(short:-G) * β disables printing of chord diagrams of the chords used in a song.--easy-chord-gridsβ not supported. π--no-easy-chord-grids(short:-g) β not supported. π--chord-grids-sorted(short:-S) * β prints chord diagrams of the chords used in a song, ordered by key and type.--no-chord-grids-sorted* β prints chord diagrams in the order they appear in the song.--user-chord-grids* β prints chord diagrams of all user defined chords used in a song.--even-pages-number-left(short-L) β not supported. use"pdf.even-odd-pages"in the config instead.--odd-pages-number-leftβ not supported. use"pdf.even-odd-pages"in the config instead.--page-size=FMT(short:-P) * β specifies the page size for the PDF output, e.g."a4"(default),"letter".--single-space(short-a)) * β when a lyrics line has no chords associated, suppresses the vertical space normally occupied by the chords.--vertical-space=N(short:-w) * β adds some extra vertical space between the lines.--2-up(short:-2) β not supported. π--4-up(short:-4) β not supported. π--page-number-logical(short:-n) β not supported. π--dump-chords(short:-D) β dumps a list of built-in chords in a form dependent of the backend used. the PDF backend will produce neat pages of chord diagrams. the ChordPro backend will produce a list of"define"directives.--dump-chords-text(short:-d) β dumps a list of built-in chords in the form of"define"directives, and exits.
π Configuration options π
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. it's a look-don't-touch situation π«Ά
--nosongconfigβ don't use song specific config files, even if they exist.--sysconfig=CFGβ designates a system specific config file.
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.
--nosysconfigβ don't use the system specific config file, even if it exists.--userconfig=CFGβ designates the config file for the user.
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.
--nouserconfigβ don't use the user specific config file, even if it exists.--config=CFG(shorter:--cfg) β designates the config file specific for this run.
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.
--noconfigβ don't use the specific config file, even if it exists.--define=itemβ sets a configuration item. item must be in the format of colon-separated configuration keys, an equal sign, and the value. for example, the equivalent of--diagrams=noneis--define=diagrams.show=0.
--define may be used multiple times to set multiple items. stack 'em up π₯
--no-default-configs(short:-X) β do not use any config files except the ones mentioned explicitly on the command line.
this guarantees that the program is running with the default configuration.
--print-template-configβ prints a simplified template configuration to standard output, and exits. the configuration is commented to explain its contents.
the config contains most of the ChordPro configuration items, all commented out. it is easy to get started with configuring ChordPro by enabling and modifying just a few items at a time β¨
--print-default-configβ if used once, behaves like--print-template-config. this is to avoid confusing novice users.
to get the full default configuration, repeat this option.
--print-final-configβ prints the final configuration (after processing all system, user and other config files) to standard output, and exits.--convert-config=fileβ this option requires a single file name argument.
the specified config file is loaded and immediately 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.
π Miscellaneous options π
--help(short:-h) β prints a help message. no other output is produced.--manualβ prints the manual page. no other output is produced.--identβ shows the program name and version.--verboseβ provides more verbose information of what is going on. π
π FONTS π
okay so bestie, fonts. There are literally two ways to specify them: with a font filename, and with a built-in font name. that's it, that's the vibe.
A font filename must be either an absolute filename, or a relative filename which is interpreted relative to the font path. And what even is the font path? slay, so glad you asked β it consists of:
- the 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. no fake files, she will simply not render for you.
If it is not a filename, it must be the name of one of the built-in PDF core fonts:
CourierCourier-BoldCourier-BoldObliqueCourier-ObliqueHelveticaHelvetica-BoldHelvetica-BoldObliqueHelvetica-ObliqueSymbolTimes-BoldTimes-BoldItalicTimes-ItalicTimes-RomanZapfDingbats
those are the classics, the old money of fonts honestly. π
π MOTIVATION π
okay why a rewrite of Chordii? good question, bestie, sit down.
Chordii is the de facto reference implementation of the ChordPro file format standard. periodt. It implements ChordPro version 4.
ChordPro version 5 adds a number of new features, and that was pushing the limits of the very old program. like, the poor thing was going through it. 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 the author decided to create a new reference implementation from the ground up. π«Ά Chose a programming language that is flexible and very good at handling Unicode data. And that is fun to program in. (main character behavior, honestly.)
β¨ CURRENT STATUS β¨
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) π like it's coming, it's cooking, give it a minute.
π AUTHOR π
Johan Vromans "<jv at CPAN dot org >"
π¦ SUPPORT π¦
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. found a bug? tell them, don't just suffer in silence bestie π
A user community discussing ChordPro can be found at https://groups.google.com/forum/#!forum/chordpro. come hang out, it's giving group chat. πΈ
π LICENSE π
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.
that's the whole legal tea. same terms as Perl itself, no cap. π
and that's the whole page, bestie!! we ate. π β¨
this is perl v5.40.1 realness, dated 2026-05-03, and it lives in section ChordPro(3pm) β go forth and format your chords, you gorgeous genius. ππ¦πΈπ
π¦ where this page comes from
- ubuntu stonking: chordpro 6.101.0+ds-1 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms