Skip to content

jpesce/great-latex-songbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Great LaTeX Songbook Mockup

The Great LaTeX Songbook

Songbook generator powered by LaTeX

The Great LaTeX Songbook is a template for generating songbooks in a modern layout with support for lyrics, chords, chord diagrams and tablatures. It features:

  • Multiple instruments: compile multiple songbooks, one for each instrument. Define which parts of the song will show up for all instruments (e.g. lyrics and chords) and which parts will show up only for individual instruments (e.g. a solo).
  • Lyrics and chords: lyrics with section and chord changes via leadsheets
  • Chord diagrams: chord diagrams via guitarchordschemes
  • Tablature and sheet music: tablature and sheet music excerpts via musixtex

Requirements

Requires LaTeX. On Mac OS (using brew):

brew install --cask mactex-no-gui

Also requires fswatch if you want to keep watching and recompiling files:

brew install fswatch

Installation

Clone the repo:

git clone [email protected]:jpesce/great-latex-songbook.git

Usage

Generate PDFs for all instruments and clean up:

make all

Generate PDF for one instrument (e.g. ukulele):

make instrument-ukulele

Recompile when files change (requires fswatch):

make watch

Adding content

Adding a song

Add a new tex file to src/songs/. Here’s Guided By Voices’ You’re Not an Airplane as an example (see leadsheets’ documentation for the complete syntax):

\begin{song}{
  title=You're Not an Airplane,
  band=Guided by Voices,
  composer=Tobin Sprout
}

\begin{intro}
  \writechord{E} \writechord{D} \writechord{A}
\end{intro}

\begin{verse}
  Well, ^{A}come on now and see the course that ^{Asus}never fields the game of choice\\
  and ^{A}cold allies of steel couldn't ^{Asus}buy the way it feels\\
  ^{E}Rusty and divided steel the ^{D}race is yet to ^{A}come
\end{verse}

\end{song}
\newpage

Then add it to src/songs.tex in your position of choice

\input{src/songs/your-new-song-file.tex}

Guided by Voice's You're Not and Airplane chords

Adding tablature and sheet music

To add a notation section, use MusiXTeX. Here’s The Beatles’ Two of Us intro on ukulele (see the complete syntax on MusiXTeX’s documentation):

\begin{music}
  \setlines14
  \setstaffs1{1}
  \setclefsymbol1{\tabclef}
  \nobarnumbers
  \let\extractline\leftline
  \startextract
    \Notes \tab{3}{2} \tab{1}{2} \tab{3}{2} \tab{1}{2} \en
    \bar
    \Notes \tab{3}{2} \tab{1}{2} \tab{3}{2} \tab{2}{0} \en
  \endextract
\end{music}
intro

Conditional sections

Some parts may only be relevant to certain instruments. For example, the intro shown before is tabbed specifically for ukulele. To make it appear only on the ukulele songbook use the following command:

\ifx\instrument\ukulele
  % Ukulele-specific part
\fi

Adding chord diagrams

Chord diagrams are drawings that usually appear before the lyrics and show chord fingerings for a specific instrument.

Chord definitions for each instrument are located in src/chords/chords-instrument-name.tex. See guitarchordschemes’ documentation for the complete syntax.

After defining the chord names, simply add them at the beggining of the song:

\gchord
\cchord
\cbbasschord

Chord diagrams for G C and C/B

Note: Make sure all chord names are defined for all instruments or create a conditional section if the chord name is only defined for a certain instrument.

Adding new instruments

Add an entry in src/instruments-available.tex:

  \def\newinstrument{ukulele}
+ \def\newinstrument{newinstrument}

Create a chords definition file for the new instrument at src/chords/chords-newinstrument.tex. Remember to wrap it with a conditional section:

\ifx\instrument\newinstrument
  % Here be chords
\fi

Include the new chord definition file in src/songbook.tex

  \input{src/chords/chords-ukulele.tex}
+ \input{src/chords/chords-newinstrument.tex}

Add a command to makefile’s all target:

  all: $(INPUT_PATH)
+   make instrument-newinstrument
    make instrument-ukulele
    make instrument-generic

The project name is a reference to The Great American Songbook

About

Beautiful songbook generator powered by LaTeX

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published