diff --git a/.gitignore b/.gitignore
index 05506b5..eef0234 100755
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
*~
out/
-build/
-tmp/
+pdf/
midi/
music/
.DS_Store
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index fcb276c..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-build:
- image: thallian/latex-builder
- script:
- - make
- artifacts:
- paths:
- - build/*
- expire_in: 1 week
diff --git a/Makefile b/Makefile
index dac4332..db732a2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,101 +1,101 @@
-mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
-WORKING_DIR := $(patsubst %/,%,$(dir $(mkfile_path)))
-BOOKNAME=singalongs
-SRC_DIR=src
-BUILD_DIR=build
-TMP_DIR=tmp
-SONG_DIR=${SRC_DIR}/songs
-BUILD_BOOK_DIR=${BUILD_DIR}/books
-TMP_BOOK_DIR=${TMP_DIR}/books
-BUILD_SONG_DIR=${BUILD_DIR}/songs
-TMP_SONG_DIR=${TMP_DIR}/songs
-BUILD_MIDI_DIR=${BUILD_DIR}/midi
-TMP_MIDI_DIR=${TMP_DIR}/midi
-BUILD_OPUS_DIR=${BUILD_DIR}/opus
+SHELL = /bin/sh
-LY_FILES=$(wildcard ${SONG_DIR}/*.ly)
-LY_PDFS=$(patsubst %.ly,${BUILD_SONG_DIR}/%.pdf,$(notdir ${LY_FILES}))
-LY_TMP_PDFS=$(patsubst %.ly,${TMP_SONG_DIR}/%.pdf,$(notdir ${LY_FILES}))
-LY_MIDIS=$(patsubst %.ly,${BUILD_MIDI_DIR}/%.midi,$(notdir ${LY_FILES}))
-LY_TMP_MIDIS=$(patsubst %.ly,${TMP_MIDI_DIR}/%.midi,$(notdir ${LY_FILES}))
-LY_OPUS=$(patsubst %.ly,${BUILD_OPUS_DIR}/%.opus,$(notdir ${LY_FILES}))
+# a list of all used commands (they have to be in your PATH)
+LILYPOND = lilypond
+LUALATEX = lualatex
+MAKEINDEX = makeindex
+TIMIDITY = timidity
+OPUSENC = opusenc
+PDF2PS = pdf2ps
+PSBOOK = psbook
+PSTOPS = pstops
+PSNUP = psnup
+PS2PDF = ps2pdf
+SED = sed # do not use in-place editing for compatibility between different sed versions
+RM = rm
+MKDIR = mkdir
+CD = cd
+CP = cp
-.PHONY: book songs midi opus clean directories all
-.DEFAULT_GOAL := all
+SRCDIR = src
+OUTDIR = out
+PDFDIR = pdf
+MIDIDIR = midi
+OPUSDIR = music
+SCORESDIR = $(SRCDIR)/scores
+LYRICSDIR = $(SRCDIR)/lyrics
-directories: ${BUILD_DIR} ${BUILD_BOOK_DIR} ${TMP_BOOK_DIR} ${BUILD_SONG_DIR} ${BUILD_MIDI_DIR} ${TMP_DIR} ${TMP_SONG_DIR} ${TMP_MIDI_DIR} ${BUILD_OPUS_DIR}
+OUTPUTFILE = $(OUTDIR)/singalongs.tex
-${BUILD_DIR}:
- mkdir -p ${BUILD_DIR}
+SCORES = $(wildcard $(SCORESDIR)/*.ly)
+LYRICS = $(wildcard $(LYRICSDIR)/*.tex)
+PDFS = $(patsubst %.ly,$(PDFDIR)/%.pdf,$(notdir $(SCORES)))
+MIDIS = $(patsubst %.ly,$(MIDIDIR)/%.midi,$(notdir $(SCORES)))
+OPUSFILES = $(patsubst %.ly,$(OPUSDIR)/%.opus,$(notdir $(SCORES)))
-${BUILD_BOOK_DIR}:
- mkdir -p ${BUILD_BOOK_DIR}
+LILYPONDSUBST = $(foreach score,$(SCORES), \\\\chapter {$(shell grep title "$(score)" | awk -F '"|"' '{print $$2}')} \\\\includely[staffsize=18]{$(abspath $(score))} ~\\\\\\\\ ~\\\\\\\\ \\\\input{$(abspath $(LYRICSDIR)/$(notdir $(basename $(score)))).tex})
-${BUILD_SONG_DIR}:
- mkdir -p ${BUILD_SONG_DIR}
+BOOKPDF = $(PDFDIR)/book.pdf
+BOOKLETPDF = $(PDFDIR)/booklet.pdf
-${BUILD_MIDI_DIR}:
- mkdir -p ${BUILD_MIDI_DIR}
+MIDITEMPO = 120
-${TMP_DIR}:
- mkdir -p ${TMP_DIR}
+all: pdfs midis opus book booklet
-${TMP_BOOK_DIR}:
- mkdir -p ${TMP_BOOK_DIR}
+pdfs: $(PDFS)
-${TMP_SONG_DIR}:
- mkdir -p ${TMP_SONG_DIR}
+midis: pdfs $(MIDIS)
-${TMP_MIDI_DIR}:
- mkdir -p ${TMP_MIDI_DIR}
+opus: midis $(OPUSFILES)
-${BUILD_OPUS_DIR}:
- mkdir -p ${BUILD_OPUS_DIR}
+book: $(BOOKPDF)
-${TMP_SONG_DIR}/%.pdf: ${SONG_DIR}/%.ly ${SONG_DIR}/%.tex
- cd ${SRC_DIR} && lualatex --jobname='$(notdir $(basename $@))' --output-directory=${WORKING_DIR}/${TMP_SONG_DIR} --shell-escape ${WORKING_DIR}/${SRC_DIR}/song.tex ${WORKING_DIR}/${SONG_DIR}/$(notdir $(basename $@)).ly ${WORKING_DIR}/${SONG_DIR}/$(notdir $(basename $@)).tex
- rm -r ${SRC_DIR}/tmp-ly
+booklet: $(BOOKLETPDF)
-${BUILD_MIDI_DIR}/%.midi: ${TMP_MIDI_DIR}/%-1.midi
- cp $< $@
+$(BOOKPDF): | $(PDFDIR) $(OUTDIR)
+ @$(CP) $(SRCDIR)/*.tex $(OUTDIR)/
+ @$(CP) -r lib/* $(OUTDIR)/
+ @$(CP) -r $(SRCDIR)/images $(OUTDIR)/images
-${TMP_MIDI_DIR}/%-1.midi: ${SONG_DIR}/%.ly
- lilypond --output=${TMP_MIDI_DIR} ${WORKING_DIR}/$<
+ @$(SED) "s;\musicbooklet;$(LILYPONDSUBST);g" $(SRCDIR)/singalongs.tex > $(OUTPUTFILE).00
+ @$(SED) 's/REVISION/$(shell git log -1 --format="%h")/g' $(OUTPUTFILE).00 > $(OUTPUTFILE)
-${BUILD_OPUS_DIR}/%.opus: ${BUILD_MIDI_DIR}/%.midi
- timidity $< -Ow -o - | opusenc - $@
+ @$(CD) $(OUTDIR); \
+ $(LUALATEX) -shell-escape singalongs.tex; \
+ $(MAKEINDEX) singalongs.tex; \
+ $(LUALATEX) -shell-escape singalongs.tex
-${TMP_BOOK_DIR}/%.pdf: ${SRC_DIR}/%.tex ${SRC_DIR}/images/title.png
- latexmk -cd -lualatex -e '$$lualatex=q/lualatex %O -shell-escape %S/' -output-directory=${WORKING_DIR}/${TMP_BOOK_DIR} $<
- rm -r ${SRC_DIR}/tmp-ly
+ @$(CP) $(OUTDIR)/singalongs.pdf $(PDFDIR)/$(@F)
-${TMP_BOOK_DIR}/%-folio.pdf: ${TMP_BOOK_DIR}/%.pdf
- cd ${TMP_BOOK_DIR} && \
- ../../bin/makebook -v -t folio -i $(notdir $<) -o $(notdir $@)
+$(BOOKLETPDF): $(BOOKPDF)
+ $(PDF2PS) $(BOOKPDF) - | $(PSBOOK) | $(PSTOPS) -pa4 '1:0@1.0(-1.25cm,0cm)' | $(PSNUP) -2 | $(PS2PDF) - $(PDFDIR)/$(@F)
-#long edge binding
-${TMP_BOOK_DIR}/%-quarto.pdf: ${TMP_BOOK_DIR}/%.pdf
- cd ${TMP_BOOK_DIR} && \
- ../../bin/makebook -v -t quarto -i $(notdir $<) -o $(notdir $@)
+$(PDFDIR)/%.pdf: $(SCORESDIR)/%.ly | $(PDFDIR) $(OUTDIR)
+ @$(SED) 's/%title/title/g' $< > $(OUTDIR)/$(notdir $<).00
+ @$(SED) 's/\header {/\paper{indent=0\\mm} \\header { tagline=""/g' $(OUTDIR)/$(notdir $<).00 > $(OUTDIR)/$(notdir $<)
+ @$(LILYPOND) --output=$(PDFDIR)/$(basename $(@F)) $(OUTDIR)/$(notdir $<)
-${TMP_BOOK_DIR}/%-sexto.pdf: ${TMP_BOOK_DIR}/%.pdf
- cd ${TMP_BOOK_DIR} && \
- ../../bin/makebook -v -t sexto -i $(notdir $<) -o $(notdir $@)
+$(MIDIDIR)/%.midi: $(SCORESDIR)/%.ly | $(MIDIDIR) $(OUTDIR)
+ @$(SED) 's/\layout { }/\midi{ \\tempo 4 = $(MIDITEMPO) }/g' $< > $(OUTDIR)/$(notdir $<).00
+ @$(SED) 's/\header/\include "articulate.ly" \\header/g' $(OUTDIR)/$(notdir $<).00 > $(OUTDIR)/$(notdir $<).01
+ @$(SED) 's/<\\articulate \\unfoldRepeats < $(OUTDIR)/$(notdir $<)
+ @$(LILYPOND) --output=$(MIDIDIR)/$(basename $(@F)) $(OUTDIR)/$(notdir $<)
-#short edge binding
-${TMP_BOOK_DIR}/%-octavo.pdf: ${TMP_BOOK_DIR}/%.pdf
- cd ${TMP_BOOK_DIR} && \
- ../../bin/makebook -v -t octavo -i $(notdir $<) -o $(notdir $@)
+$(OPUSDIR)/%.opus: $(MIDIDIR)/%.midi | $(OPUSDIR)
+ @$(TIMIDITY) $< -Ow -o - | $(OPUSENC) - $(OPUSDIR)/$(@F)
-${BUILD_DIR}/%.pdf: ${TMP_DIR}/%.pdf
- cp $< $@
+$(PDFDIR):
+ @$(MKDIR) -p $(PDFDIR)
-book: directories ${BUILD_BOOK_DIR}/${BOOKNAME}.pdf ${BUILD_BOOK_DIR}/${BOOKNAME}-folio.pdf ${BUILD_BOOK_DIR}/${BOOKNAME}-quarto.pdf ${BUILD_BOOK_DIR}/${BOOKNAME}-sexto.pdf ${BUILD_BOOK_DIR}/${BOOKNAME}-octavo.pdf ${LY_FILES}
-songs: directories ${LY_PDFS}
-midi: directories ${LY_MIDIS}
-opus: directories ${LY_OPUS}
-all: book songs midi opus
+$(MIDIDIR):
+ @$(MKDIR) -p $(MIDIDIR)
+$(OPUSDIR):
+ @$(MKDIR) -p $(OPUSDIR)
+
+$(OUTDIR):
+ @$(MKDIR) -p $(OUTDIR)
+
+.PHONY: clean
clean:
- rm -rf ${BUILD_DIR}
- rm -rf ${TMP_DIR}
+ @$(RM) -rf $(PDFDIR) $(MIDIDIR) $(OPUSDIR) $(OUTDIR)
diff --git a/README.md b/README.md
index 1cd50fe..9c03d24 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,6 @@
Sing Alongs
===========
-[Latest Releases](https://code.vanwa.ch/sebastian/sing-alongs/-/releases)
-
Motivation
----------
@@ -20,31 +18,18 @@ with something like [git](http://git-scm.com/).
Development
-----------
+Main development happens at https://code.vanwa.ch/sing-alongs but there is a
+mirror of the git repository on [Github](https://github.com/thallian/sing_alongs).
-Main development happens at https://code.vanwa.ch/sebastian/sing-alongs.
+The master branch contains only full songs (lyrics, melody and chords) and the
+only time it is updated is for changing layout related stuff or merging a song.
-Take a look at the command list in the makefile to see what you need for building.
-
-The makefile defines multiple targets:
-
-- pdfs: builds all songs as single pdfs (without lyrics for now)
-- midis: builds the midi file for each song
-- opus: converts the midi files into opus files
-- book: concatenates the songs (with lyrics) to a songbook
-- booklet: converts the songbook to a booklet fit for double sided flip printing
-
-To build all just run `make` and it takes care of everything.
-
-License Stuff
--------------
-
-I am still not quite clear on how this works. My understanding is that all these
-songs already are in the public domain and there is no need to explicitly set a license.
-
-All copyrights that could arise from other sides (makefile or whatever) are waived
-under [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
+Songs live in their own branch. If there is an error the branch gets fixed and
+then merged into the master. I am not sure how well this goes with a growing
+number of songs but lets see ;)
+Also, the older songs may not have their own branch yet, so it has to be
+created when the first correction comes up.
Contact
-------
-
-You can reach me at [sebastian@vanwa.ch](mailto:sebastian@vanwa.ch)
+You can reach me at [shugentobler@vanwa.ch](mailto:hugentobler@vanwa.ch)
diff --git a/bin/makebook b/bin/makebook
deleted file mode 100755
index 93913e0..0000000
--- a/bin/makebook
+++ /dev/null
@@ -1,655 +0,0 @@
-#!/bin/sh
-# +AMDG This document was begun just before Christmas,
-# 2010, and it is humbly dedicated to St. Wulfric, patron of
-# bookbinders, and to the Immaculate Heart of Mary for their
-# prayers, and to the Sacred Heart of Jesus for His mercy.
-#
-#**********************************************************#
-# makebook #
-# written by Donald P. Goodman III #
-# Copyright (C) 2011 #
-# #
-# Impose pdf pages for binding #
-#**********************************************************#
-#
-# This program is free software: you can redistribute it
-# and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation,
-# either version 3 of the License, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be
-# useful, but WITHOUT ANY WARRANTY; without even the implied
-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-# PURPOSE. See the GNU General Public License for more
-# details.
-#
-# For a full copy of the GNU General Public License, see
-# .
-#
-#**********************************************************#
-# begin the code #
-#**********************************************************#
-# make script more portable and secure
-PATH=/bin:/usr/bin:/usr/local/bin ; export PATH
-umask 033
-# define our revision number variable for rcs
-REVISION="2.1"
-# define error codes
-E_WRONG_ARGS=64 # too many or few args
-E_BAD_SIG_TYPE=65 # invalid type of signature
-E_BAD_UNIT=66 # unrecognized dimension unit used
-E_BAD_FILENAME=67 # filename contains insecure chars,
- # or doesn't exist
-E_BAD_OPT=68 # bad command-line flag requested
-E_NO_PROG=69 # missing a required program
-# define usage variables
-VERBOSE=0 # 0 if not verbose, 1 if -v
-SIG_TYPE="folio" # type of section desired
-PAGES_PER_SIG=4 # number of pages per signature
-SECT_TYPE=1 # number of signatures per section
-NUP="2x1" # default format of signatures
-FRONT_FAVOR=0 # favor front for blanks; off by default
-# define various variables to be zero by default
-TGT_PAGE_WIDTH=0
-TGT_PAGE_HEIGHT=0
-HORIZ_DELTA=0
-VERT_DELTA=0
-HORIZ_OFFSET=0
-VERT_OFFSET=0
-SCALE=1
-# make sure user has the right programs installed, and die
-# horribly if not
-command -v od >/dev/null 2>&1 ||
- { echo >&2 "makebook: error: requires od, but it's not installed";
- exit $E_NO_PROG;
- }
-command -v pdflatex >/dev/null 2>&1 ||
- { echo >&2 "makebook: error: requires pdflatex, but it's not installed";
- exit $E_NO_PROG;
- }
-command -v pdfinfo >/dev/null 2>&1 ||
- { echo >&2 "makebook: error: requires pdfinfo, but it's not installed";
- exit $E_NO_PROG;
- }
-command -v pdftk >/dev/null 2>&1 ||
- { echo >&2 "makebook: error: requires pdftk, but it's not installed";
- exit $E_NO_PROG;
- }
-command -v dc >/dev/null 2>&1 ||
- { echo >&2 "makebook: error: requires dc, but it's not installed";
- exit $E_NO_PROG;
- }
-command -v bc >/dev/null 2>&1 ||
- { echo >&2 "makebook: error: requires bc, but it's not installed";
- exit $E_NO_PROG;
- }
-
-# print the version information and exit successfully
-versionfunc ()
-{
- echo "makebook v${REVISION}. Copyright (C) 2011, Donald P."
- echo "Goodman III."
- echo "This program comes with ABSOLUTELY NO WARRANTY."
- echo "This is free software, and you are welcome to "
- echo "redistribute it under certain conditions; see "
- echo "the GNU GPL v3 for details."
- exit 0
-}
-
-# print the online help and exit successfully
-helpfunc ()
-{
-cat <&2
- exit $E_BAD_UNIT
- fi
- if [ `expr match "$1" '.*\(in\)'` ]
- then
- OPTARG=`echo "scale=0; ${1%in} * 72" | bc`
- OPTARG=${OPTARG%.*}
- elif [ `expr match "$1" '.*\(cm\)'` ]
- then
- OPTARG=`echo "scale=0; ${1%cm} * 28.3464567" | bc`
- OPTARG=${OPTARG%.*}
- elif [ `expr match "$1" '.*\(mm\)'` ]
- then
- OPTARG=`echo "scale=0; ${1%mm} * 2.83464567" | bc`
- OPTARG=${OPTARG%.*}
- elif [ `expr match "$1" '.*\(pt\)'` ]
- then
- OPTARG=`echo "scale=0; ${1%pt} / 1.00375" | bc`
- OPTARG=${OPTARG%.*}
- elif [ `expr match "$1" '.*\(pc\)'` ]
- then
- OPTARG=`echo "scale=0; (${1%pc} / 1.00375) * 12" | bc`
- OPTARG=${OPTARG%.*}
- elif [ `expr match "$1" '.*\(bp\)'` ]
- then
- OPTARG=${1%bp}
- else
- OPTARG=${1%.*}
- fi
-}
-# define a for dealing with section types; convert ()
-# to words; e.g., "4to" to "quarto"
-typearg ()
-{
- if [ "$1" = "4to" ] || [ "$1" = "quarto" ]
- then
- PAGES_PER_SIG=8
- NUP="2x2"
- OPTARG="quarto"
- elif [ "$1" = "2o" ] || [ "$1" = "folio" ]
- then
- PAGES_PER_SIG=4
- NUP="2x1"
- OPTARG="folio"
- elif [ "$1" = "8vo" ] || [ "$1" = "octavo" ]
- then
- PAGES_PER_SIG=16
- NUP="4x2"
- OPTARG="octavo"
- elif [ "$1" = "6to" ] || [ "$1" = "sexto" ]
- then
- PAGES_PER_SIG=12
- NUP="2x3"
- OPTARG="sexto"
- elif [ "$1" = "12mo" ] || [ "$1" = "duodecimo" ]
- then
- PAGES_PER_SIG=24
- NUP="4x3"
- OPTARG="duodecimo"
- else
- echo "ERROR: signature type \"$1\" not recognized." >&2
- exit $E_BAD_SIG_TYPE
- fi
-}
-
-# clean up filename argument
-filefunc ()
-{
- err_message="ERROR: bad characters in file name."
- if [ `echo "$1" | grep '\?'` ]
- then
- echo "$err_message" >&2
- exit $E_BAD_FILENAME
- elif [ `echo "$1" | grep '\*'` ]
- then
- echo "$err_message" >&2
- exit $E_BAD_FILENAME
- elif [ `echo "$1" | grep '"'` ]
- then
- echo "$err_message" >&2
- exit $E_BAD_FILENAME
- elif [ `echo "$1" | grep ';'` ]
- then
- echo "$err_message" >&2
- exit $E_BAD_FILENAME
- elif [ `echo "$1" | grep '[\\]'` ]
- then
- echo "$err_message" >&2
- exit $E_BAD_FILENAME
- elif [ `echo "$1" | grep ' '` ]
- then
- echo "$err_message" >&2
- exit $E_BAD_FILENAME
- fi
- OPTARG=`basename $1`
-}
-
-# now identify and parse the options
-while getopts "Vhvfn:t:H:w:d:D:m:M:s:i:o:" Option
-do
- case $Option in
- V ) versionfunc;;
- h ) helpfunc;;
- v ) VERBOSE=1;;
- f ) FRONT_FAVOR=1;;
- n ) SECT_TYPE=$OPTARG;;
- t ) typearg "$OPTARG"; SIG_TYPE=$OPTARG;;
- H ) unitarg "$OPTARG"; TGT_PAGE_HEIGHT=$OPTARG;;
- w ) unitarg "$OPTARG"; TGT_PAGE_WIDTH=$OPTARG;;
- d ) unitarg "$OPTARG"; HORIZ_DELTA=$OPTARG;;
- D ) unitarg "$OPTARG"; VERT_DELTA=$OPTARG;;
- m ) unitarg "$OPTARG"; HORIZ_OFFSET=$OPTARG;;
- M ) unitarg "$OPTARG"; VERT_OFFSET=$OPTARG;;
- s ) SCALE=$OPTARG;;
- i ) filefunc "$OPTARG"; FILE_NAME=$OPTARG;;
- o ) filefunc "$OPTARG"; OUTFILE_NAME=$OPTARG;;
- * ) echo "ERROR: unknown flag \
- \"$Option\"." >&2; exit $E_BAD_OPT;;
- esac
-done
-
-# make random file name to use for input
-NEW_FILE_NAME="tmp_`od -An -N4 -t uL /dev/urandom | tr -d '\ '`.pdf"
-# if input file specified, use file; if not, read stdin
-if [ "$FILE_NAME" ]
-then
- cp "$FILE_NAME" "$NEW_FILE_NAME"
-else
- FILE_NAME="book.pdf"
- cat /dev/stdin > "$NEW_FILE_NAME"
-fi
-# declare holder variable for pdftk
-tmp_name="tmp_`od -An -N4 -t uL /dev/urandom | tr -d '\ '`.pdf"
-# if output file specified, use that; if not, name it; if
-# "-", use stdout
-[ "$OUTFILE_NAME" ] || OUTFILE_NAME="sigs_$FILE_NAME"
-if [ "$OUTFILE_NAME" = "stdout" ]
-then
- VERBOSE=0
-fi
-# print our introduction message
-if [ $VERBOSE -eq 1 ]
-then
- echo "makebook. Copyright (C) 2011, Donald P. Goodman III."
- echo "This program comes with ABSOLUTELY NO WARRANTY."
- echo "This is free software, and you are welcome to "
- echo "redistribute it under certain conditions; see "
- echo "the GNU GPL v3 for details."
- echo "IMPOSING pdf pages onto \"$OUTFILE_NAME\"..."
-fi
-
-# get some information about our source document
-NUM_PAGES=`pdfinfo "$NEW_FILE_NAME" | awk '/Pages:/ {print $2}'`;
-SRC_PAGE_WIDTH=`pdfinfo "$NEW_FILE_NAME" | awk '/Page\ size:/ {print $3}'`;
-SRC_PAGE_HEIGHT=`pdfinfo "$NEW_FILE_NAME" | awk '/Page\ size:/ {print $5}'`;
-# find the number of pages we'll have per signature
-PAGES_PER_SIG=$(dc -e "$PAGES_PER_SIG $SECT_TYPE * p")
-# determine if extra pages will be necessary
-NUM_BLANKS=`expr $NUM_PAGES % $PAGES_PER_SIG`
-if [ $NUM_BLANKS -ne 0 ]
-then
- NUM_BLANKS=`expr $PAGES_PER_SIG - $NUM_BLANKS`
-fi
-tmp=`expr $NUM_PAGES + $NUM_BLANKS`
-NUM_SIGS=`expr $tmp / $PAGES_PER_SIG`
-
-# if extra pages are needed, generate blank page
-if [ $NUM_BLANKS -gt 0 ] && [ ! -e "./blank.pdf" ]
-then
- echo "\documentclass{article}" > blank.tex
- echo '\\thispagestyle{empty}' >> blank.tex
- echo "\usepackage[paperwidth=${SRC_PAGE_WIDTH}bp,paperheight="${SRC_PAGE_HEIGHT}bp"]{geometry}" >> blank.tex
- echo '\\begin{document}' >> blank.tex
- echo "\quad \\\\end{document}" >> blank.tex
- if [ $VERBOSE -eq 1 ]
- then
- echo "CREATING blank page to fill sections...";
- fi
- pdflatex blank.tex > /dev/null 2&>1
-fi
-# now insert blank pages as needed, preferring the back for
-# odd numbers by default, front if stated
-if [ $NUM_BLANKS -eq 1 ]
-then
- if [ $VERBOSE -eq 1 ]
- then
- echo "INSERTING one blank page..."
- fi
- if [ $FRONT_FAVOR -eq 0 ]
- then
- pdftk A="$NEW_FILE_NAME" B=blank.pdf cat A1-end \
- B1 output "$tmp_name"
- else
- pdftk A="$NEW_FILE_NAME" B=blank.pdf cat B1 \
- A1-end output "$tmp_name"
- fi
- mv "$tmp_name" "$NEW_FILE_NAME"
-else
-# tmp=`expr $NUM_BLANKS / 2`
-# START_BLANKS=${tmp/.*}
- START_BLANKS=`expr $NUM_BLANKS / 2`
- END_BLANKS=`expr $NUM_BLANKS - $START_BLANKS`
- if [ `expr $START_BLANKS % 2` -ne 0 ]; then : else
- START_BLANKS=`expr $START_BLANKS - 1`
- END_BLANKS=`expr $END_BLANKS + 1 `
- fi
- if [ $FRONT_FAVOR -eq 1 ]
- then
- tmp=$START_BLANKS
- START_BLANKS=$END_BLANKS
- END_BLANKS=$tmp
- if [ `expr $START_BLANKS % 2` -ne 0 ]; then : else
- START_BLANKS=`expr $START_BLANKS - 1`
- END_BLANKS=`expr $END_BLANKS + 1 `
- fi
- fi
- if [ $VERBOSE -eq 1 ]
- then
- echo "INSERTING $START_BLANKS blank pages at start..."
- echo "INSERTING $END_BLANKS blank pages at end...";
- fi
- i=0
- while [ $i -lt $START_BLANKS ]
- do
- pdftk A="$NEW_FILE_NAME" B=blank.pdf cat B1 A1-end output "$tmp_name"
- mv "$tmp_name" "$NEW_FILE_NAME"
- i=`expr $i + 1`
- done
- i=0
- while [ $i -lt $END_BLANKS ]
- do
- pdftk A="$NEW_FILE_NAME" B=blank.pdf cat A1-end B1 output "$tmp_name"
- mv "$tmp_name" "$NEW_FILE_NAME"
- i=`expr $i + 1`
- done
-fi
-# begin the imposing, announcing if appropriate
-tmp=`expr $NUM_PAGES + $NUM_BLANKS`
-if [ $VERBOSE -eq 1 ]
-then
- echo "IMPOSING $NUM_PAGES pages ($tmp with blanks) on
- $(dc -e "$NUM_SIGS $SECT_TYPE * p") signature(s) gathered in
- sections of $SECT_TYPE signature(s) each...";
-fi
-# arrange the pages for impression on signatures
-i=1
-j=1
-if [ $VERBOSE -eq 1 ]
-then
- echo "REARRANGING pages...";
-fi
-while [ $j -le $NUM_SIGS ]
-do
- if [ "$SIG_TYPE" = "quarto" ]
- then
- # determine size of target page
- if [ $TGT_PAGE_HEIGHT -eq 0 ]
- then
- TGT_PAGE_HEIGHT=$(dc -e "$SRC_PAGE_HEIGHT 2 * p")
- fi
- if [ $TGT_PAGE_WIDTH -eq 0 ]
- then
- TGT_PAGE_WIDTH=$(dc -e "$SRC_PAGE_WIDTH 2 * p")
- fi
- # do the rearranging
- k=$i; n=1; total=$(dc -e "$SECT_TYPE 8 * p"); m=$total
- while [ $n -le $SECT_TYPE ]
- do
- pdftk "$NEW_FILE_NAME" cat `expr $k + $m - 1` $k \
- `expr $k + $m - 4`south `expr $k + 3`south \
- `expr $k + 1` `expr $k + $m - 2` `expr $k + 2`south \
- `expr $k + $m - 3`south output ${tmp_name%.pdf}_$n;
- k=`expr $k + 4`; n=`expr $n + 1`; m=`expr $m - 8`
- done
- n=1
- while [ `expr $n + 0` -le $SECT_TYPE ]
- do
- if [ ! -e "$tmp_name" ]
- then
- pdftk A=${tmp_name%.pdf}_$n cat A1-end \
- output "$tmp_name"
- else
- pdftk A=$tmp_name B=${tmp_name%.pdf}_`expr $n` \
- cat A1-end B1-end output ${tmp_name}_tmp
- mv ${tmp_name}_tmp "$tmp_name"
- fi
- n=`expr $n + 1`
- done
- if [ $VERBOSE -eq 1 ]
- then
- echo "REARRANGING section number $j..."
- fi
- j=`expr $j + 1`;
- i=`expr $i + $total`;
- elif [ "$SIG_TYPE" = "folio" ]
- then
- # determine size of target page
- if [ 1 -eq "$(echo "${TGT_PAGE_HEIGHT} == 0" | bc)" ]
- then
- TGT_PAGE_HEIGHT=$(dc -e "$SRC_PAGE_HEIGHT 1 * p")
- fi
- if [ 1 -eq "$(echo "${TGT_PAGE_WIDTH} == 0" | bc)" ]
- then
- TGT_PAGE_WIDTH=$(dc -e "$SRC_PAGE_WIDTH 2 * p")
- fi
- # do the rearranging
- k=$i; n=1; total=$(dc -e "$SECT_TYPE 4 * p"); m=$total
- while [ $n -le $SECT_TYPE ]
- do
- pdftk "$NEW_FILE_NAME" cat `expr $k + $m - 1` \
- `expr $k` `expr $k + 1` `expr $k + $m - 2` \
- output ${tmp_name%.pdf}_$n;
- k=`expr $k + 2`; n=`expr $n + 1`; m=`expr $m - 4`
- done
- n=1
- while [ `expr $n + 0` -le $SECT_TYPE ]
- do
- if [ ! -e "$tmp_name" ]
- then
- pdftk A=${tmp_name%.pdf}_$n cat A1-end \
- output "$tmp_name"
- else
- pdftk A="$tmp_name" B=${tmp_name%.pdf}_`expr $n` \
- cat A1-end B1-end output ${tmp_name}_tmp
- mv ${tmp_name}_tmp "$tmp_name"
- fi
- n=`expr $n + 1`
- done
- if [ $VERBOSE -eq 1 ]
- then
- echo "REARRANGING section number $j..."
- fi
- j=`expr $j + 1`;
- i=`expr $i + $total`;
- elif [ "$SIG_TYPE" = "octavo" ]
- then
- # determine target page dimensions
- if [ 1 -eq "$(echo "${TGT_PAGE_HEIGHT} == 0" | bc)" ]
- then
- TGT_PAGE_HEIGHT=$(dc -e "$SRC_PAGE_HEIGHT 2 * p")
- fi
- if [ 1 -eq "$(echo "${TGT_PAGE_WIDTH} == 0" | bc)" ]
- then
- TGT_PAGE_WIDTH=$(dc -e "$SRC_PAGE_WIDTH 4 * p")
- fi
- # do the rearranging
- k=$i; n=1; total=$(dc -e "$SECT_TYPE 16 * p"); m=$total
- while [ $n -le $SECT_TYPE ]
- do
- pdftk "$NEW_FILE_NAME" cat `expr $k + 3` \
- `expr $k + $m - 4` `expr $k + $m - 1` $k \
- `expr $k + 4`south `expr $k + $m - 5`south \
- `expr $k + $m - 8`south `expr $k + 7`south \
- `expr $k + 1` `expr $k + $m - 2` `expr $k + $m - 3` \
- `expr $k + 2` `expr $k + 6`south `expr $k + $m - 7`south \
- `expr $k + $m - 6`south `expr $k + 5`south \
- output ${tmp_name%.pdf}_$n;
- k=`expr $k + 8`; n=`expr $n + 1`; m=`expr $m - 16`
- done
- n=1
- while [ `expr $n + 0` -le $SECT_TYPE ]
- do
- if [ ! -e "$tmp_name" ]
- then
- pdftk A=${tmp_name%.pdf}_$n cat A1-end \
- output "$tmp_name"
- else
- pdftk A="$tmp_name" B=${tmp_name%.pdf}_`expr $n` \
- cat A1-end B1-end output ${tmp_name}_tmp
- mv ${tmp_name}_tmp "$tmp_name"
- fi
- n=`expr $n + 1`
- done
- if [ $VERBOSE -eq 1 ]
- then
- echo "REARRANGING section number $j..."
- fi
- j=`expr $j + 1`;
- i=`expr $i + $total`;
- elif [ "$SIG_TYPE" = "sexto" ]
- then
- # determine target page dimensions
- if [ $TGT_PAGE_HEIGHT -eq 0 ]
- then
- TGT_PAGE_HEIGHT=$(dc -e "$SRC_PAGE_HEIGHT 3 * p")
- fi
- if [ $TGT_PAGE_WIDTH -eq 0 ]
- then
- TGT_PAGE_WIDTH=$(dc -e "$SRC_PAGE_WIDTH 2 * p")
- fi
- # do the rearranging
- k=$i; n=1; total=$(dc -e "$SECT_TYPE 12 * p"); m=$total
- while [ $n -le $SECT_TYPE ]
- do
- pdftk "$NEW_FILE_NAME" cat `expr $k + 5` \
- `expr $k + 6` `expr $k + $m - 1` $k \
- `expr $k + $m - 1 - 3`south `expr $k + 3`south \
- `expr $k + 7` `expr $k + 4` \
- `expr $k + 1` `expr $k + $m - 1 - 1` \
- `expr $k + 2`south `expr $k + $m - 1 - 2`south \
- output ${tmp_name%.pdf}_$n;
- k=`expr $k + 6`; n=`expr $n + 1`; m=`expr $m - 12`
- done
- n=1
- while [ `expr $n + 0` -le $SECT_TYPE ]
- do
- if [ ! -e "$tmp_name" ]
- then
- pdftk A=${tmp_name%.pdf}_$n cat A1-end \
- output "$tmp_name"
- else
- pdftk A=$tmp_name B=${tmp_name%.pdf}_`expr $n` \
- cat A1-end B1-end output ${tmp_name}_tmp
- mv ${tmp_name}_tmp "$tmp_name"
- fi
- n=`expr $n + 1`
- done
- if [ $VERBOSE -eq 1 ]
- then
- echo "REARRANGING section number $j..."
- fi
- j=`expr $j + 1`;
- i=`expr $i + $total`;
- elif [ "$SIG_TYPE" = "duodecimo" ]
- then
- # determine target page dimensions
- if [ $TGT_PAGE_HEIGHT -eq 0 ]
- then
- TGT_PAGE_HEIGHT=$(dc -e "$SRC_PAGE_HEIGHT 3 * p")
- fi
- if [ $TGT_PAGE_WIDTH -eq 0 ]
- then
- TGT_PAGE_WIDTH=$(dc -e "$SRC_PAGE_WIDTH 4 * p")
- fi
- # do the rearranging
- k=$i; n=1; total=$(dc -e "$SECT_TYPE 24 * p"); m=$total
- while [ $n -le $SECT_TYPE ]
- do
- pdftk "$NEW_FILE_NAME" cat `expr $k + 8` \
- `expr $k + $m - 1 - 8` `expr $k + 12` \
- `expr $k + 11` `expr $k + 4` \
- `expr $k + $m - 1 - 3` `expr $k + $m - 1` \
- $k `expr $k + 4`south `expr $k + $m - 1 - 4`south \
- `expr $k + $m - 1 - 7`south `expr $k + 7`south \
- `expr $k + 10` `expr $k + 13` `expr $k + 14` \
- `expr $k + 9` `expr $k + 1` `expr $k + $m - 1 - 1` \
- `expr $k + $m - 1 - 2` `expr $k + 2` \
- `expr $k + 6`south `expr $k + $m - 1 - 6`south \
- `expr $k + $m - 1 - 5`south `expr $k + 5`south \
- output ${tmp_name%.pdf}_$n;
- k=`expr $k + 12`; n=`expr $n + 1`; m=`expr $m - 24`
- done
- n=1
- while [ `expr $n + 0` -le $SECT_TYPE ]
- do
- if [ ! -e "$tmp_name" ]
- then
- pdftk A=${tmp_name%.pdf}_$n cat A1-end \
- output $tmp_name
- else
- pdftk A="$tmp_name" B=${tmp_name%.pdf}_`expr $n` \
- cat A1-end B1-end output ${tmp_name}_tmp
- mv ${tmp_name}_tmp "$tmp_name"
- fi
- n=`expr $n + 1`
- done
- if [ $VERBOSE -eq 1 ]
- then
- echo "REARRANGING section number $j..."
- fi
- j=`expr $j + 1`;
- i=`expr $i + $total`;
- fi
-done
-mv "$tmp_name" "$NEW_FILE_NAME"
-rm ${tmp_name%.pdf}*
-echo "\documentclass{article}
- \usepackage{pdfpages}
- \usepackage[paperwidth=${TGT_PAGE_WIDTH}bp,paperheight=${TGT_PAGE_HEIGHT}bp]{geometry}
- \pagestyle{empty}" > ${OUTFILE_NAME%.pdf}.tex
-echo '\\begin{document}' >> ${OUTFILE_NAME%.pdf}.tex
-echo "\includepdf[nup=$NUP,pages=-,turn=false,columnstrict,
- noautoscale,delta=${HORIZ_DELTA}bp ${VERT_DELTA}bp,
- offset=${HORIZ_OFFSET}bp ${VERT_OFFSET}bp,scale=${SCALE}]
- {./"$NEW_FILE_NAME"}" >> ${OUTFILE_NAME%.pdf}.tex
-echo "\\\\end{document}" >> ${OUTFILE_NAME%.pdf}.tex
-if [ $VERBOSE -eq 1 ]
-then
- echo "IMPOSING sections..."
-fi
-pdflatex ${OUTFILE_NAME%.pdf}.tex > /dev/null 2>&1
-if [ $VERBOSE -eq 1 ]
-then
- echo "CLEANING up..."
-fi
-rm ${OUTFILE_NAME%.pdf}.tex ${OUTFILE_NAME%.pdf}.aux \
- ${OUTFILE_NAME%.pdf}.log "$NEW_FILE_NAME"
-if [ -e "./blank.tex" ]; then
- rm ./blank.tex
-fi
-if [ -e "./blank.aux" ]; then
- rm ./blank.aux
-fi
-if [ -e "./blank.log" ]; then
- rm ./blank.log
-fi
-if [ $VERBOSE -eq 1 ]
-then
- echo "`expr $NUM_PAGES + $NUM_BLANKS` pages imposed in
- $(dc -e "$NUM_SIGS $SECT_TYPE * p") $SIG_TYPE signatures gathered
- in sections of $SECT_TYPE signature(s) each and output to
- ${OUTFILE_NAME%.pdf}.pdf."
-fi
-if [ "$OUTFILE_NAME" = "stdout" ]
-then
- cat ${OUTFILE_NAME}.pdf
- rm ${OUTFILE_NAME}.pdf
-fi
-exit 0
diff --git a/lib/lyluatex.lua b/lib/lyluatex.lua
new file mode 100644
index 0000000..195eb9d
--- /dev/null
+++ b/lib/lyluatex.lua
@@ -0,0 +1,186 @@
+local err, warn, info, log = luatexbase.provides_module({
+ name = "lyluatex",
+ version = '0',
+ greinternalversion = internalversion,
+ date = "2015/07/14",
+ description = "Module lyluatex.",
+ author = "The Gregorio Project (see CONTRIBUTORS.md)",
+ copyright = "2008-2015 - The Gregorio Project",
+ license = "MIT",
+})
+
+local md5 = require 'md5'
+
+
+LILYPOND = 'lilypond'
+TMP = 'tmp_ly'
+N = 0
+
+
+function ly_definir_programme(lilypond)
+ if lilypond then LILYPOND = lilypond end
+end
+
+
+function contenuIntegral(contenu)
+ local content =""
+ for i, Line in ipairs(contenu:explode('\n')) do
+ if Line:find("^%s*[^%%]*\\include") then
+ local i = io.open(Line:gsub('%s*\\include%s*"(.*)"%s*$', "%1"), 'r')
+ if i then
+ content = content .. contenuIntegral(i:read('*a'))
+ else
+ content = content .. Line .. "\n"
+ end
+ else
+ content = content .. Line .. "\n"
+ end
+ end
+ return content
+end
+
+
+function direct_ly(ly, largeur, facteur)
+ N = N + 1
+ facteur = calcul_facteur(facteur)
+ ly = ly:gsub('\\par ', '\n')
+ local sortie = TMP..'/'..string.gsub(md5.sumhexa(contenuIntegral(ly))..'-'..facteur..'-'..largeur, '%.', '-')
+ if not lfs.isfile(sortie..'-systems.tex') then
+ compiler_ly(entete_lilypond(facteur, largeur - 10)..'\n'..ly, sortie)
+ end
+ retour_tex(sortie)
+end
+
+
+function inclure_ly(entree, currfiledir, largeur, facteur)
+ facteur = calcul_facteur(facteur)
+ nom = splitext(entree, 'ly')
+ entree = currfiledir..nom..'.ly'
+ if not lfs.isfile(entree) then entree = kpse.find_file(nom..'.ly') end
+ if not lfs.isfile(entree) then err("Le fichier %s.ly n'existe pas.", nom) end
+ local i = io.open(entree, 'r')
+ ly = i:read('*a')
+ i:close()
+ local sortie = TMP..'/' ..string.gsub(md5.sumhexa(contenuIntegral(ly))..'-'..facteur..'-'..largeur, '%.', '-')
+ if not lfs.isfile(sortie..'-systems.tex') then
+ compiler_ly(entete_lilypond(facteur, largeur - 10)..'\n'..ly, sortie, dirname(entree))
+ end
+ retour_tex(sortie)
+end
+
+
+function compiler_ly(ly, sortie, include)
+ mkdirs(dirname(sortie))
+ local commande = LILYPOND.." "..
+ "-dno-point-and-click "..
+ "-dbackend=eps "..
+ "-djob-count=2 "..
+ "-ddelete-intermediate-files "
+ if include then commande = commande.."-I "..lfs.currentdir()..'/'..include.." " end
+ commande = commande.."-o "..sortie.." -"
+ local p = io.popen(commande, 'w')
+ p:write(ly)
+ p:close()
+end
+
+
+function entete_lilypond(facteur, largeur)
+ return string.format(
+[[%%En-tête
+\version "2.18.2"
+#(define default-toplevel-book-handler
+ print-book-with-defaults-as-systems )
+
+#(define toplevel-book-handler
+ (lambda ( . rest)
+ (set! output-empty-score-list #f)
+ (apply print-book-with-defaults rest)))
+
+#(define toplevel-music-handler
+ (lambda ( . rest)
+ (apply collect-music-for-book rest)))
+
+#(define toplevel-score-handler
+ (lambda ( . rest)
+ (apply collect-scores-for-book rest)))
+
+#(define toplevel-text-handler
+ (lambda ( . rest)
+ (apply collect-scores-for-book rest)))
+
+
+#(set-global-staff-size %s)
+
+
+%%Paramètres de la partition
+\paper{
+ indent = 0\mm
+ line-width = %s\pt
+}
+
+%%Partition originale
+]],
+facteur,
+largeur
+)
+end
+
+
+function calcul_facteur(facteur)
+ if facteur == 0 then facteur = fontinfo(font.current()).size/39321.6 end
+ return facteur
+end
+
+
+function retour_tex(sortie)
+ local i = io.open(sortie..'-systems.tex', 'r')
+ contenu = i:read("*all")
+ i:close()
+ texoutput, _ = string.gsub(
+ contenu,
+ [[includegraphics{]], [[includegraphics{]]..dirname(sortie)
+ )
+ tex.print(([[\noindent]]..texoutput):explode('\n'))
+end
+
+
+function dirname(str)
+ if str:match(".-/.-") then
+ local name = string.gsub(str, "(.*/)(.*)", "%1")
+ return name
+ else
+ return ''
+ end
+end
+
+
+function splitext(str, ext)
+ if str:match(".-%..-") then
+ local name = string.gsub(str, "(.*)(%." .. ext .. ")", "%1")
+ return name
+ else
+ return str
+ end
+end
+
+
+function mkdirs(str)
+ path = '.'
+ for dir in string.gmatch(str, '([^%/]+)') do
+ path = path .. '/' .. dir
+ lfs.mkdir(path)
+ end
+end
+
+
+local fontdata = fonts.hashes.identifiers
+function fontinfo(id)
+ local f = fontdata[id]
+ if f then
+ return f
+ end
+ return font.fonts[id]
+end
+
+
+mkdirs(TMP)
diff --git a/lib/lyluatex.sty b/lib/lyluatex.sty
new file mode 100644
index 0000000..6725cba
--- /dev/null
+++ b/lib/lyluatex.sty
@@ -0,0 +1,69 @@
+\ProvidesPackage{lyluatex}
+
+% Dépendances
+\RequirePackage{kvoptions}
+\RequirePackage{graphicx}
+\RequirePackage{keycommand}
+\RequirePackage{environ}
+\RequirePackage{currfile}
+% Options
+\DeclareStringOption[lilypond]{program}[lilypond]
+\ProcessKeyvalOptions*
+% Script lua
+\directlua{dofile(kpse.find_file("lyluatex.lua"))}
+\directlua{ly_definir_programme('\lyluatex@program')}
+
+% Une tricherie un peu sale pour récupérer la largeur de ligne
+\let\bs\textbackslash
+{\catcode`p=12 \catcode`t=12 \gdef\un#1pt{#1}}
+\newcommand*{\largeur}{\expandafter\un\the\linewidth}
+% Taille des partitions
+% Si la valeur est 0, elle sera automatiquement calculée
+% à partir de la taille de police.
+\def\staffsize{0}
+\let\localstaffsize\staffsize
+
+
+% Commandes principales
+% Inclusion d'un fichier ly
+\newkeycommand*\includely[staffsize=\staffsize][autres][1]{%
+\directlua{%
+ inclure_ly(
+ "\luatexluaescapestring{#1}",
+ "\luatexluaescapestring{\currfiledir}",
+ \luatexluaescapestring{\largeur},
+ \luatexluaescapestring{\commandkey{staffsize}}
+ )%
+}%
+}
+
+% Inclusion d'un fragment intégré au document (environnement de base)
+\NewEnviron{compilerly}{%
+\directlua{%
+ direct_ly(
+ "\luatexluaescapestring{\unexpanded\expandafter{\BODY}}",
+ \luatexluaescapestring{\largeur},
+ \luatexluaescapestring{\localstaffsize}
+ )%
+}%
+}
+
+% Commande et environnement avec paramètres
+\newkeycommand{\lily}[staffsize=\staffsize][autres][1]{%
+\def\localstaffsize{\commandkey{staffsize}}%
+\begin{compilerly}%
+#1
+\end{compilerly}%
+}
+
+\newkeyenvironment{ly}[staffsize=\staffsize][autres]{%
+\def\localstaffsize{\commandkey{staffsize}}%
+\compilerly%
+}{
+\endcompilerly%
+}
+
+% Commandes pour la compatibilité avec lilypond-book
+\let\lilypondfile\includely
+\let\lilypond\ly
+\let\endlilypond\endly
diff --git a/src/songs/AllForMeGrog.tex b/src/lyrics/AllForMeGrog.tex
similarity index 100%
rename from src/songs/AllForMeGrog.tex
rename to src/lyrics/AllForMeGrog.tex
diff --git a/src/songs/AuldLangSyne.tex b/src/lyrics/AuldLangSyne.tex
similarity index 100%
rename from src/songs/AuldLangSyne.tex
rename to src/lyrics/AuldLangSyne.tex
diff --git a/src/songs/BlackVelvetBand.tex b/src/lyrics/BlackVelvetBand.tex
similarity index 100%
rename from src/songs/BlackVelvetBand.tex
rename to src/lyrics/BlackVelvetBand.tex
diff --git a/src/songs/Buergerlied.tex b/src/lyrics/Buergerlied.tex
similarity index 100%
rename from src/songs/Buergerlied.tex
rename to src/lyrics/Buergerlied.tex
diff --git a/src/songs/DrunkenSailor.tex b/src/lyrics/DrunkenSailor.tex
similarity index 95%
rename from src/songs/DrunkenSailor.tex
rename to src/lyrics/DrunkenSailor.tex
index 9d3290b..208c580 100644
--- a/src/songs/DrunkenSailor.tex
+++ b/src/lyrics/DrunkenSailor.tex
@@ -47,11 +47,11 @@ Put him in the bed with the captain's daughter. \\
Way-hey up she rises \\
Way-hey up she rises \\
Way-hey up she rises \\
-Early in the morning! \\
+Earl-eye in the morning! \\
~\\
That's what we do with a drunken sailor \\
That's what we do with a drunken sailor \\
That's what we do with a drunken sailor \\
-Early in the morning! \\
+Earl-eye in the morning! \\
\end{center}
\end{multicols*}
diff --git a/src/songs/FinnegansWake.tex b/src/lyrics/FinnegansWake.tex
similarity index 100%
rename from src/songs/FinnegansWake.tex
rename to src/lyrics/FinnegansWake.tex
diff --git a/src/songs/FoggyDew.tex b/src/lyrics/FoggyDew.tex
similarity index 100%
rename from src/songs/FoggyDew.tex
rename to src/lyrics/FoggyDew.tex
diff --git a/src/songs/ImARoverSeldomSober.tex b/src/lyrics/ImARoverSeldomSober.tex
similarity index 100%
rename from src/songs/ImARoverSeldomSober.tex
rename to src/lyrics/ImARoverSeldomSober.tex
diff --git a/src/songs/IrishRover.tex b/src/lyrics/IrishRover.tex
similarity index 100%
rename from src/songs/IrishRover.tex
rename to src/lyrics/IrishRover.tex
diff --git a/src/songs/JohnnyIHardlyKnewYe.tex b/src/lyrics/JohnnyIHardlyKnewYe.tex
similarity index 100%
rename from src/songs/JohnnyIHardlyKnewYe.tex
rename to src/lyrics/JohnnyIHardlyKnewYe.tex
diff --git a/src/songs/KerryRecruit.tex b/src/lyrics/KerryRecruit.tex
similarity index 100%
rename from src/songs/KerryRecruit.tex
rename to src/lyrics/KerryRecruit.tex
diff --git a/src/songs/MacPhersonsFarewell.tex b/src/lyrics/MacPhersonsFarewell.tex
similarity index 100%
rename from src/songs/MacPhersonsFarewell.tex
rename to src/lyrics/MacPhersonsFarewell.tex
diff --git a/src/songs/MollyMalone.tex b/src/lyrics/MollyMalone.tex
similarity index 100%
rename from src/songs/MollyMalone.tex
rename to src/lyrics/MollyMalone.tex
diff --git a/src/songs/MuirsheenDurkin.tex b/src/lyrics/MuirsheenDurkin.tex
similarity index 100%
rename from src/songs/MuirsheenDurkin.tex
rename to src/lyrics/MuirsheenDurkin.tex
diff --git a/src/songs/NationOnceAgain.tex b/src/lyrics/NationOnceAgain.tex
similarity index 100%
rename from src/songs/NationOnceAgain.tex
rename to src/lyrics/NationOnceAgain.tex
diff --git a/src/songs/PartingGlass.tex b/src/lyrics/PartingGlass.tex
similarity index 100%
rename from src/songs/PartingGlass.tex
rename to src/lyrics/PartingGlass.tex
diff --git a/src/songs/RisingOfTheMoon.tex b/src/lyrics/RisingOfTheMoon.tex
similarity index 100%
rename from src/songs/RisingOfTheMoon.tex
rename to src/lyrics/RisingOfTheMoon.tex
diff --git a/src/songs/SpancilHill.tex b/src/lyrics/SpancilHill.tex
similarity index 100%
rename from src/songs/SpancilHill.tex
rename to src/lyrics/SpancilHill.tex
diff --git a/src/songs/StarOfTheCountyDown.tex b/src/lyrics/StarOfTheCountyDown.tex
similarity index 100%
rename from src/songs/StarOfTheCountyDown.tex
rename to src/lyrics/StarOfTheCountyDown.tex
diff --git a/src/songs/WhiskeyInTheJar.tex b/src/lyrics/WhiskeyInTheJar.tex
similarity index 100%
rename from src/songs/WhiskeyInTheJar.tex
rename to src/lyrics/WhiskeyInTheJar.tex
diff --git a/src/songs/WildRover.tex b/src/lyrics/WildRover.tex
similarity index 100%
rename from src/songs/WildRover.tex
rename to src/lyrics/WildRover.tex
diff --git a/src/scores/AllForMeGrog.ly b/src/scores/AllForMeGrog.ly
new file mode 100644
index 0000000..79b5b0c
--- /dev/null
+++ b/src/scores/AllForMeGrog.ly
@@ -0,0 +1,37 @@
+\version "2.16.2"
+
+\header {
+ %title = "All for Me Grog"
+ composer = "Stephen Hatfield"
+}
+
+global = {
+ \time 4/4
+ \key g \major
+}
+
+chordNames = \chordmode {
+ \global
+ s8 g1 c2 g1. d1 g1 c2 g1 d2 d2:7 g4.
+}
+
+melody = \relative d' {
+ \global
+ \partial 8 d8 |
+ g4 b8. a16 g4. fis8 |
+ e fis g e d2 |
+ d'4 d8. d16 d4 c8 b |
+ b a4.( a4) b8 c |
+ d(e) d b g4 g8 fis |
+ e a g e d4 g8 a |
+ b d c b b a g fis |
+ a2 g4( g8) \bar "|."
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/songs/AuldLangSyne.ly b/src/scores/AuldLangSyne.ly
similarity index 51%
rename from src/songs/AuldLangSyne.ly
rename to src/scores/AuldLangSyne.ly
index bde5a50..344e373 100644
--- a/src/songs/AuldLangSyne.ly
+++ b/src/scores/AuldLangSyne.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "Auld Lang Syne"
+ %title = "Auld Lang Syne"
composer = "Robert Burns"
}
@@ -37,29 +36,10 @@ melody = \relative a' {
d2. s4 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
\ No newline at end of file
diff --git a/src/scores/BlackVelvetBand.ly b/src/scores/BlackVelvetBand.ly
new file mode 100644
index 0000000..88a7684
--- /dev/null
+++ b/src/scores/BlackVelvetBand.ly
@@ -0,0 +1,45 @@
+\version "2.16.0"
+
+\header {
+ %title = "The Black Velvet Band"
+ composer = "Traditional"
+}
+
+global = {
+ \time 3/4
+ \key g \major
+}
+
+chordNames = \chordmode {
+ \global
+ s4 d1.*3 a1.:7 d1*9/4 a d
+}
+
+melody = \relative g'' {
+ \global
+ \partial 4 d4 |
+ d2 d4 |
+ b c4. d8 |
+ c4 b2( |
+ b) a4 |
+ g a b |
+ g fis e |
+ d2.( |
+ d4) d' c |
+ b2 b4 |
+ d, e fis |
+ g2( a4) |
+ b2 g4 |
+ a b c |
+ fis, g a |
+ g2.( |
+ g2) s4 \bar "|."
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/scores/Buergerlied.ly b/src/scores/Buergerlied.ly
new file mode 100644
index 0000000..f7d97e4
--- /dev/null
+++ b/src/scores/Buergerlied.ly
@@ -0,0 +1,43 @@
+\version "2.16.0"
+
+\header {
+ %title = "Bürgerlied"
+ composer = "Adalbert Harnisch"
+}
+
+global = {
+ \time 5/4
+ \key g \major
+}
+
+chordNames = \chordmode {
+ \global
+ s4 g1*3/4 e2:m g1*3/4 c2:7 a2:m d1*3/4:7 g1*3/4 c2:7 a2:m d1*3/4:7 g2 d4 g2 g d4 g2
+}
+
+melody = \relative d' {
+ \global
+ \partial 4 d8 d |
+ g4. g8 g a b b g a |
+ b4 d d8 c c b a g |
+ a b c b a4. r8 d c |
+
+ \repeat volta 2
+ {
+ b4 d e8 d c b a g |
+ a4 c d8 c b a g g |
+ }
+ \alternative
+ {
+ { g4 b a8 a g4 d'8 c }
+ { g4 b a8 a g4 s4 \bar "|." }
+ }
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/scores/DrunkenSailor.ly b/src/scores/DrunkenSailor.ly
new file mode 100644
index 0000000..ee2a0c8
--- /dev/null
+++ b/src/scores/DrunkenSailor.ly
@@ -0,0 +1,44 @@
+\version "2.16.0"
+
+\header {
+ %title = "Drunken Sailor"
+ composer = "Traditional"
+}
+
+global = {
+ \time 2/4
+ \key d \major
+}
+
+chordNames = \chordmode {
+ \global
+ a1:m g a:m g2 a:m a1:m g a:m g2 a:m
+}
+
+melody = \relative b' {
+ \global
+ b8 b16 b b8 b16 b |
+ b8 e, g b |
+ a a16 a a8 a16 a |
+ a8 d, fis a |
+ b b16 b b8 b16 b |
+ b8 cis d e |
+ d b a fis |
+ e4 e \bar ":|:"
+ b' b |
+ b8 e, g b |
+ a4 a |
+ a8 d, fis a |
+ b4 b |
+ b8 cis d e |
+ d b a fis |
+ e4 e \bar ":|"
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/songs/FinnegansWake.ly b/src/scores/FinnegansWake.ly
similarity index 56%
rename from src/songs/FinnegansWake.ly
rename to src/scores/FinnegansWake.ly
index 10bdb95..70985c7 100644
--- a/src/songs/FinnegansWake.ly
+++ b/src/scores/FinnegansWake.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "Finnegan's Wake"
+ %title = "Tim Finnegan's Wake"
composer = "Traditional"
}
@@ -45,29 +44,10 @@ melody = \relative a' {
e16 e fis8 g \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/FoggyDew.ly b/src/scores/FoggyDew.ly
similarity index 50%
rename from src/songs/FoggyDew.ly
rename to src/scores/FoggyDew.ly
index d8368f0..61bf5fa 100644
--- a/src/songs/FoggyDew.ly
+++ b/src/scores/FoggyDew.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "The Foggy Dew"
+ %title = "The Foggy Dew"
composer = "Charles O’Neill"
}
@@ -45,29 +44,10 @@ melody = \relative g' {
e2 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/scores/ImARoverSeldomSober.ly b/src/scores/ImARoverSeldomSober.ly
new file mode 100644
index 0000000..7b67136
--- /dev/null
+++ b/src/scores/ImARoverSeldomSober.ly
@@ -0,0 +1,35 @@
+\version "2.16.0"
+
+\header {
+ %title = "I'm a Rover Seldom Sober"
+ composer = "Traditional"
+}
+
+global = {
+ \time 4/4
+ \key g \major
+}
+
+chordNames = \chordmode {
+ \global
+ s4 g2 c g1*5/4 d1*3/4 g1*2 d4 g2
+}
+
+melody = \relative g' {
+ \global
+ \partial 4 g8. g16 |
+ g4 d8. d16 e8. e16 e4 |
+ d g8. g16 g4 b8. b16 |
+ b8. b16 a4 r8 d8 d8. c16 |
+ b4 d8. d16 a8. fis16 g4 d |
+ g8. a16 b4 b8. b16 a8. |
+ a16 g4 r4 \bar "|."
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/songs/IrishRover.ly b/src/scores/IrishRover.ly
similarity index 52%
rename from src/songs/IrishRover.ly
rename to src/scores/IrishRover.ly
index 66cc60d..97d864a 100644
--- a/src/songs/IrishRover.ly
+++ b/src/scores/IrishRover.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "The Irish Rover"
+ %title = "The Irish Rover"
composer = "Traditional"
}
@@ -41,29 +40,10 @@ melody = \relative d'' {
g2. s4 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/JohnnyIHardlyKnewYe.ly b/src/scores/JohnnyIHardlyKnewYe.ly
similarity index 50%
rename from src/songs/JohnnyIHardlyKnewYe.ly
rename to src/scores/JohnnyIHardlyKnewYe.ly
index 7455c81..a2fae1f 100644
--- a/src/songs/JohnnyIHardlyKnewYe.ly
+++ b/src/scores/JohnnyIHardlyKnewYe.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "Johnny I hardly Knew Ye"
+ %title = "Johnny I hardly Knew Ye"
composer = "Traditional"
}
@@ -37,29 +36,10 @@ melody = \relative c' {
a4.( a4) r8 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/scores/KerryRecruit.ly b/src/scores/KerryRecruit.ly
new file mode 100644
index 0000000..2ee63bf
--- /dev/null
+++ b/src/scores/KerryRecruit.ly
@@ -0,0 +1,33 @@
+\version "2.16.0"
+
+\header {
+ %title = "The Kerry Recruit"
+ composer = "Traditional"
+}
+
+global = {
+ \time 6/8
+ \key g \major
+}
+
+chordNames = \chordmode {
+ \global
+ s8 g1*6/8 d:7 d c1*3/8 g
+}
+
+melody = \relative b' {
+ \global
+ \partial 8 b8 |
+ a8 g g g4 b8 |
+ b a a a4 d8 |
+ e d d b4 a8 |
+ a g g g4 \bar "|."
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/songs/MacPhersonsFarewell.ly b/src/scores/MacPhersonsFarewell.ly
similarity index 50%
rename from src/songs/MacPhersonsFarewell.ly
rename to src/scores/MacPhersonsFarewell.ly
index 3e4f80e..1ca94b4 100644
--- a/src/songs/MacPhersonsFarewell.ly
+++ b/src/scores/MacPhersonsFarewell.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "MacPherson's Farewell"
+ %title = "MacPherson's Farewell"
composer = "Robert Burns"
}
@@ -37,29 +36,10 @@ melody = \relative g' {
g2. s4 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/MollyMalone.ly b/src/scores/MollyMalone.ly
similarity index 52%
rename from src/songs/MollyMalone.ly
rename to src/scores/MollyMalone.ly
index 9772e5b..d206e42 100644
--- a/src/songs/MollyMalone.ly
+++ b/src/scores/MollyMalone.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "Molly Malone"
+ %title = "Molly Malone"
composer = "Traditional"
}
@@ -43,29 +42,10 @@ melody = \relative g' {
}
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/scores/MuirsheenDurkin.ly b/src/scores/MuirsheenDurkin.ly
new file mode 100644
index 0000000..391c70c
--- /dev/null
+++ b/src/scores/MuirsheenDurkin.ly
@@ -0,0 +1,45 @@
+\version "2.16.0"
+
+\header {
+ %title = "Muirsheen Durkin"
+ composer = "Traditional"
+}
+
+global = {
+ \time 4/4
+ \key d \major
+}
+
+chordNames = \chordmode {
+ \global
+ s4 g1 d1*2 g d g d g d g1
+}
+
+melody = \relative d' {
+ \global
+ \partial 4 d8. e16 |
+ fis4 fis e d |
+ e a a b |
+ cis a g e |
+ e d2 d8. e16 |
+ fis4 fis e d |
+ e a2 b4 |
+ cis8 cis a4 b cis |
+ d2. a4 |
+ d d e d |
+ cis a a b |
+ cis a g e |
+ e d2 d8. e16 |
+ fis2 e4 d |
+ e a a b |
+ cis a g( e) |
+ d2. s4 \bar "|."
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/songs/NationOnceAgain.ly b/src/scores/NationOnceAgain.ly
similarity index 57%
rename from src/songs/NationOnceAgain.ly
rename to src/scores/NationOnceAgain.ly
index 74f9db7..1d8687a 100644
--- a/src/songs/NationOnceAgain.ly
+++ b/src/scores/NationOnceAgain.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "A Nation Once Again"
+ %title = "A Nation Once Again"
composer = "Thomas Osborne Davis"
}
@@ -45,29 +44,10 @@ melody = \relative a' {
d2. s4 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/PartingGlass.ly b/src/scores/PartingGlass.ly
similarity index 51%
rename from src/songs/PartingGlass.ly
rename to src/scores/PartingGlass.ly
index e529b70..60fc375 100644
--- a/src/songs/PartingGlass.ly
+++ b/src/scores/PartingGlass.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "The Parting Glass"
+ %title = "The Parting Glass"
composer = "Traditional"
}
@@ -37,29 +36,10 @@ melody = \relative b' {
g4 e e s \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/scores/RisingOfTheMoon.ly b/src/scores/RisingOfTheMoon.ly
new file mode 100644
index 0000000..b15ba5e
--- /dev/null
+++ b/src/scores/RisingOfTheMoon.ly
@@ -0,0 +1,33 @@
+\version "2.16.0"
+
+\header {
+ %title = "The Rising of the Moon"
+ composer = "John Keegan Casey"
+}
+
+global = {
+ \time 4/4
+ \key g \major
+}
+
+chordNames = \chordmode {
+ \global
+ s4 g1 d c2 g d g
+}
+
+melody = \relative d' {
+ \global
+ \partial 4 g8 a |
+ b8. b16 b8 b b d4 b8 |
+ b a a b a4. d8 |
+ e8. c16 g'8 fis e d b g |
+ a8. a16 g8 fis g4 r4 \bar "|."
+}
+
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
+}
diff --git a/src/songs/SpancilHill.ly b/src/scores/SpancilHill.ly
similarity index 55%
rename from src/songs/SpancilHill.ly
rename to src/scores/SpancilHill.ly
index 89dbcba..e14cc9b 100644
--- a/src/songs/SpancilHill.ly
+++ b/src/scores/SpancilHill.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.2"
\header {
- title = "Spancil Hill"
+ %title = "Spancil Hill"
composer = "Michael Considine"
}
@@ -66,29 +65,10 @@ melody = \relative e'' {
a2) s4 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/StarOfTheCountyDown.ly b/src/scores/StarOfTheCountyDown.ly
similarity index 52%
rename from src/songs/StarOfTheCountyDown.ly
rename to src/scores/StarOfTheCountyDown.ly
index cf0e388..4a5868c 100644
--- a/src/songs/StarOfTheCountyDown.ly
+++ b/src/scores/StarOfTheCountyDown.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "The Star of the County Down"
+ %title = "The Star of the County Down"
composer = "Cathal Mac Garvey"
}
@@ -41,29 +40,10 @@ melody = \relative c' {
}
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/WhiskeyInTheJar.ly b/src/scores/WhiskeyInTheJar.ly
similarity index 51%
rename from src/songs/WhiskeyInTheJar.ly
rename to src/scores/WhiskeyInTheJar.ly
index 9cb8feb..890ae6a 100644
--- a/src/songs/WhiskeyInTheJar.ly
+++ b/src/scores/WhiskeyInTheJar.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "Whiskey in the Jar"
+ %title = "Whiskey in the Jar"
composer = "Traditional"
}
@@ -46,29 +45,10 @@ melody = \relative fis' {
d2. s4 \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/songs/WildRover.ly b/src/scores/WildRover.ly
similarity index 51%
rename from src/songs/WildRover.ly
rename to src/scores/WildRover.ly
index db97420..c945843 100644
--- a/src/songs/WildRover.ly
+++ b/src/scores/WildRover.ly
@@ -1,8 +1,7 @@
-\version "2.18.2"
-\include "articulate.ly"
+\version "2.16.0"
\header {
- title = "The Wild Rover"
+ %title = "The Wild Rover"
composer = "Traditional"
}
@@ -42,29 +41,10 @@ melody = \relative g' {
g2. \bar "|."
}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
+\score {
+ <<
+ \new ChordNames \chordNames
+ \new Staff { \melody }
+ >>
+ \layout { }
}
diff --git a/src/settings.tex b/src/settings.tex
index 2fc06d9..8de82c6 100644
--- a/src/settings.tex
+++ b/src/settings.tex
@@ -1,3 +1,5 @@
+\geometry{a4paper,left=20mm,right=20mm, top=3cm, bottom=3cm}
+
\setlength{\columnseprule}{0.2pt}
\hypersetup
@@ -14,5 +16,9 @@
pdfcreator={Sebastian Hugentobler}, % creator of the document
pdfproducer={Sebastian Hugentobler}, % producer of the document
pdfnewwindow=true, % links in new window
- colorlinks=false, % false: boxed links; true: colored links
+ colorlinks=true, % false: boxed links; true: colored links
+ citecolor=black,
+ filecolor=black,
+ linkcolor=black,
+ urlcolor=black
}
diff --git a/src/singalongs.tex b/src/singalongs.tex
index d240d89..21e0316 100644
--- a/src/singalongs.tex
+++ b/src/singalongs.tex
@@ -1,41 +1,22 @@
% !Mode:: "TeX:UTF-8"
-\documentclass[11pt, openany, twoside]{scrbook}
-\usepackage[utf8]{inputenc}
+\documentclass[12pt, a4paper, openany]{scrbook}
\usepackage{fontspec}
+\usepackage{lmodern}
+\usepackage{graphicx}
\usepackage{fancyhdr}
-\usepackage[a4paper]{geometry}
-\usepackage{tgschola}
-\usepackage{tocloft}
+\usepackage{geometry}
\usepackage[unicode]{hyperref}
\usepackage{multicol}
-\usepackage{songs}
\usepackage{lyluatex}
-\usepackage{graphicx}
-
-\makeatletter
-
-\newcommand{\unchapter}[1]{%
- \begingroup
- \let\@makechapterhead\@gobble % make \@makechapterhead do nothing
- \chapter{#1}
- \endgroup
-}
-
-\makeatother
-
-\directlua {
- local f = assert(io.popen('git rev-parse --short HEAD', 'r'))
- local s = assert(f:read('*a'))
- f:close()
-
- tex.sprint("\string\\newcommand {\string\\revision}{" .. s .. "}")
-}
+\newcommand {\revision}{ REVISION }
\input{settings.tex}
\input{headfoot.tex}
\begin{document}
+ \widowpenalties 1 10000
+ \raggedbottom
\pagenumbering{roman}
\input{title.tex}
@@ -58,16 +39,10 @@
\tableofcontents
- \newpage
+ \clearpage
\pagenumbering{arabic}
- \lysetoption{staffsize}{22}
- \lysetoption{quote}{true}
- \lysetoption{indent}{false}
- \lysetoption{insert}{inline}
- \lysetoption{pass-fonts}{true}
-
- \songs
+ \musicbooklet
\end{document}
diff --git a/src/song.tex b/src/song.tex
deleted file mode 100644
index 6e15eb6..0000000
--- a/src/song.tex
+++ /dev/null
@@ -1,31 +0,0 @@
-% !Mode:: "TeX:UTF-8"
-
-\documentclass[11pt, openany, oneside]{scrbook}
-
-\usepackage{fontspec}
-\usepackage[a4paper]{geometry}
-\usepackage{lmodern}
-\usepackage{tgschola}
-\usepackage[unicode]{hyperref}
-\usepackage{multicol}
-\usepackage{lyluatex}
-
-\begin{document}
-
- \pagenumbering{gobble}
-
- \lysetoption{staffsize}{22}
- \lysetoption{quote}{true}
- \lysetoption{indent}{false}
- \lysetoption{insert}{inline}
- \lysetoption{pass-fonts}{true}
-
- \directlua{
- tex.sprint("\string\\lilypondfile{" .. arg[5] .. "}")
- }
- ~\\
- \directlua{
- tex.sprint("\string\\input{" .. arg[6] .. "}")
- }
-
-\end{document}
diff --git a/src/songs.lua b/src/songs.lua
deleted file mode 100644
index 8f4f560..0000000
--- a/src/songs.lua
+++ /dev/null
@@ -1,36 +0,0 @@
-require "lfs"
-
-local open = io.open
-
-local function read_file(path)
- local file = open(path, "rb") -- r read mode and b binary mode
- if not file then return nil end
- local content = file:read "*a" -- *a or *all reads the whole file
- file:close()
- return content
-end
-
-function string.ends(String,End)
- return End=='' or string.sub(String,-string.len(End))==End
-end
-
-function find_songs(dir)
- local files = {}
- for file in lfs.dir(dir) do
- table.insert(files, file)
- end
- table.sort(files)
-
- for i = 1, #files do
- local file = files[i]
- if string.ends(file, ".ly") then
- local ly_content = read_file(dir .. '/' .. file)
- local ly_title = string.match(ly_content, 'title = "(.-)"')
- tex.sprint('\\unchapter{' .. ly_title .. '}')
- tex.sprint('\\lilypondfile{' .. dir .. '/' .. file .. '}')
- tex.sprint('~\\\\')
- tex.sprint('~\\\\')
- tex.sprint('\\input{' .. dir .. '/' .. file:gsub("%.ly", ".tex") .. '}')
- end
- end
-end
diff --git a/src/songs.sty b/src/songs.sty
deleted file mode 100644
index ddc9816..0000000
--- a/src/songs.sty
+++ /dev/null
@@ -1,18 +0,0 @@
-\ProvidesPackage{songs}
-
-\RequirePackage{luatexbase}
-\RequirePackage{luaotfload}
-\RequirePackage{kvoptions}
-\RequirePackage{keycommand}
-\RequirePackage{currfile}
-\directlua{dofile(kpse.find_file("songs.lua"))}
-
-\def\songpath{"./songs"}
-
-% Commandes principales
-% Inclusion d'un fichier ly
-\newkeycommand*\songs[songpath=\songpath]{%
-\directlua{%
- find_songs(\songpath)%
-}%
-}
diff --git a/src/songs/AllForMeGrog.ly b/src/songs/AllForMeGrog.ly
deleted file mode 100644
index af21683..0000000
--- a/src/songs/AllForMeGrog.ly
+++ /dev/null
@@ -1,57 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "All for Me Grog"
- composer = "Stephen Hatfield"
-}
-
-global = {
- \time 4/4
- \key g \major
-}
-
-chordNames = \chordmode {
- \global
- s8 g1 c2 g1. d1 g1 c2 g1 d2 d2:7 g4.
-}
-
-melody = \relative d' {
- \global
- \partial 8 d8 |
- g4 b8. a16 g4. fis8 |
- e fis g e d2 |
- d'4 d8. d16 d4 c8 b |
- b a4.( a4) b8 c |
- d(e) d b g4 g8 fis |
- e a g e d4 g8 a |
- b d c b b a g fis |
- a2 g4( g8) \bar "|."
-}
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/songs/BlackVelvetBand.ly b/src/songs/BlackVelvetBand.ly
deleted file mode 100644
index e4f2d8a..0000000
--- a/src/songs/BlackVelvetBand.ly
+++ /dev/null
@@ -1,65 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "The Black Velvet Band"
- composer = "Traditional"
-}
-
-global = {
- \time 3/4
- \key g \major
-}
-
-chordNames = \chordmode {
- \global
- s4 d1.*3 a1.:7 d1*9/4 a d
-}
-
-melody = \relative g'' {
- \global
- \partial 4 d4 |
- d2 d4 |
- b c4. d8 |
- c4 b2( |
- b) a4 |
- g a b |
- g fis e |
- d2.( |
- d4) d' c |
- b2 b4 |
- d, e fis |
- g2( a4) |
- b2 g4 |
- a b c |
- fis, g a |
- g2.( |
- g2) s4 \bar "|."
-}
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
\ No newline at end of file
diff --git a/src/songs/Buergerlied.ly b/src/songs/Buergerlied.ly
deleted file mode 100644
index 7c23f99..0000000
--- a/src/songs/Buergerlied.ly
+++ /dev/null
@@ -1,64 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "Bürgerlied"
- composer = "Adalbert Harnisch"
-}
-
-global = {
- \time 5/4
- \key g \major
-}
-
-chordNames = \chordmode {
- \global
- s4 g1*3/4 e2:m g1*3/4 c2:7 a2:m d1*3/4:7 g1*3/4 c2:7 a2:m d1*3/4:7 g2 d4 g2 g d4 g2
-}
-
-melody = \relative d' {
- \global
- \partial 4 d8 d |
- g4. g8 g a b b g a |
- b4 d d8 c c b a g |
- a b c b a4. r8 d c |
-
- \repeat volta 2
- {
- b4 d e8 d c b a g |
- a4 c d8 c b a g g |
- }
- \alternative
- {
- { g4 b a8 a g4 d'8 c }
- { g4 b a8 a g4 s4 \bar "|." }
- }
-}
-
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/songs/DrunkenSailor.ly b/src/songs/DrunkenSailor.ly
deleted file mode 100644
index 01551ca..0000000
--- a/src/songs/DrunkenSailor.ly
+++ /dev/null
@@ -1,64 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "Drunken Sailor"
- composer = "Traditional"
-}
-
-global = {
- \time 2/4
- \key d \major
-}
-
-chordNames = \chordmode {
- \global
- a1:m g a:m g2 a:m a1:m g a:m g2 a:m
-}
-
-melody = \relative b' {
- \global
- b8 b16 b b8 b16 b |
- b8 e, g b |
- a a16 a a8 a16 a |
- a8 d, fis a |
- b b16 b b8 b16 b |
- b8 cis d e |
- d b a fis |
- e4 e \bar ":|:"
- b' b |
- b8 e, g b |
- a4 a |
- a8 d, fis a |
- b4 b |
- b8 cis d e |
- d b a fis |
- e4 e \bar ":|"
-}
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/songs/ImARoverSeldomSober.ly b/src/songs/ImARoverSeldomSober.ly
deleted file mode 100644
index ade67c8..0000000
--- a/src/songs/ImARoverSeldomSober.ly
+++ /dev/null
@@ -1,55 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "I'm a Rover Seldom Sober"
- composer = "Traditional"
-}
-
-global = {
- \time 4/4
- \key g \major
-}
-
-chordNames = \chordmode {
- \global
- s4 g2 c g1*5/4 d1*3/4 g1*2 d4 g2
-}
-
-melody = \relative g' {
- \global
- \partial 4 g8. g16 |
- g4 d8. d16 e8. e16 e4 |
- d g8. g16 g4 b8. b16 |
- b8. b16 a4 r8 d8 d8. c16 |
- b4 d8. d16 a8. fis16 g4 d |
- g8. a16 b4 b8. b16 a8. |
- a16 g4 r4 \bar "|."
-}
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/songs/KerryRecruit.ly b/src/songs/KerryRecruit.ly
deleted file mode 100644
index 4f772e9..0000000
--- a/src/songs/KerryRecruit.ly
+++ /dev/null
@@ -1,52 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "The Kerry Recruit"
- composer = "Traditional"
-}
-
-global = {
- \time 6/8
- \key g \major
-}
-
-chordNames = \chordmode {
- \global
- s8 g1*6/8 d:7 d c1*3/8 g
-}
-
-melody = \relative b' {
- \global
- \partial 8 b8 |
- a8 g g g4 b8 |
- b a a a4 d8 |
- e d d b4 a8 |
- a g g g4 \bar "|."
-}
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/songs/MuirsheenDurkin.ly b/src/songs/MuirsheenDurkin.ly
deleted file mode 100644
index 2f533af..0000000
--- a/src/songs/MuirsheenDurkin.ly
+++ /dev/null
@@ -1,65 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "Muirsheen Durkin"
- composer = "Traditional"
-}
-
-global = {
- \time 4/4
- \key d \major
-}
-
-chordNames = \chordmode {
- \global
- s4 g1 d1*2 g d g d g d g1
-}
-
-melody = \relative d' {
- \global
- \partial 4 d8. e16 |
- fis4 fis e d |
- e a a b |
- cis a g e |
- e d2 d8. e16 |
- fis4 fis e d |
- e a2 b4 |
- cis8 cis a4 b cis |
- d2. a4 |
- d d e d |
- cis a a b |
- cis a g e |
- e d2 d8. e16 |
- fis2 e4 d |
- e a a b |
- cis a g( e) |
- d2. s4 \bar "|."
-}
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/songs/RisingOfTheMoon.ly b/src/songs/RisingOfTheMoon.ly
deleted file mode 100644
index 2ffa843..0000000
--- a/src/songs/RisingOfTheMoon.ly
+++ /dev/null
@@ -1,53 +0,0 @@
-\version "2.18.2"
-\include "articulate.ly"
-
-\header {
- title = "The Rising of the Moon"
- composer = "John Keegan Casey"
-}
-
-global = {
- \time 4/4
- \key g \major
-}
-
-chordNames = \chordmode {
- \global
- s4 g1 d c2 g d g
-}
-
-melody = \relative d' {
- \global
- \partial 4 g8 a |
- b8. b16 b8 b b d4 b8 |
- b a a b a4. d8 |
- e8. c16 g'8 fis e d b g |
- a8. a16 g8 fis g4 r4 \bar "|."
-}
-
-\book {
- \score {
- <<
- \new ChordNames \chordNames
- \new Staff { \melody }
- >>
- \layout {}
- }
-}
-
-\book {
- \score {
- \unfoldRepeats \articulate
- <<
- \new Voice = "chords" {
- \chordNames
- }
- \new Voice = "melody" {
- \melody
- }
- >>
- \midi {
- \tempo 4 = 130
- }
- }
-}
diff --git a/src/title.tex b/src/title.tex
index 67c9855..aa888d3 100644
--- a/src/title.tex
+++ b/src/title.tex
@@ -10,12 +10,12 @@
\begin{minipage}{0.5\textwidth}
\begin{flushleft} \large
\emph{Project Website:} \\
- \href{https://code.vanwa.ch/sebastian/sing-alongs}{code.vanwa.ch/sebastian/sing-alongs} \\
+ \href{https://code.vanwa.ch/sing-alongs}{code.vanwa.ch/sing-alongs} \\
\end{flushleft}
\end{minipage}
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
- \emph{Revision:} \\
+ \emph{Git Revision:} \\
\texttt{\revision} \\
\end{flushright}
\end{minipage}