Compare commits

..

No commits in common. "1795cac5141563147c18510b7dffd02046afb197" and "efc81e10d9dfa761f10c1d64014adbd24f69c75e" have entirely different histories.

63 changed files with 781 additions and 1729 deletions

3
.gitignore vendored
View File

@ -1,7 +1,6 @@
*~ *~
out/ out/
build/ pdf/
tmp/
midi/ midi/
music/ music/
.DS_Store .DS_Store

View File

@ -1,8 +0,0 @@
build:
image: thallian/latex-builder
script:
- make
artifacts:
paths:
- build/*
expire_in: 1 week

152
Makefile
View File

@ -1,101 +1,101 @@
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) SHELL = /bin/sh
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
LY_FILES=$(wildcard ${SONG_DIR}/*.ly) # a list of all used commands (they have to be in your PATH)
LY_PDFS=$(patsubst %.ly,${BUILD_SONG_DIR}/%.pdf,$(notdir ${LY_FILES})) LILYPOND = lilypond
LY_TMP_PDFS=$(patsubst %.ly,${TMP_SONG_DIR}/%.pdf,$(notdir ${LY_FILES})) LUALATEX = lualatex
LY_MIDIS=$(patsubst %.ly,${BUILD_MIDI_DIR}/%.midi,$(notdir ${LY_FILES})) MAKEINDEX = makeindex
LY_TMP_MIDIS=$(patsubst %.ly,${TMP_MIDI_DIR}/%.midi,$(notdir ${LY_FILES})) TIMIDITY = timidity
LY_OPUS=$(patsubst %.ly,${BUILD_OPUS_DIR}/%.opus,$(notdir ${LY_FILES})) 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 SRCDIR = src
.DEFAULT_GOAL := all 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}: SCORES = $(wildcard $(SCORESDIR)/*.ly)
mkdir -p ${BUILD_DIR} 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}: 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})
mkdir -p ${BUILD_BOOK_DIR}
${BUILD_SONG_DIR}: BOOKPDF = $(PDFDIR)/book.pdf
mkdir -p ${BUILD_SONG_DIR} BOOKLETPDF = $(PDFDIR)/booklet.pdf
${BUILD_MIDI_DIR}: MIDITEMPO = 120
mkdir -p ${BUILD_MIDI_DIR}
${TMP_DIR}: all: pdfs midis opus book booklet
mkdir -p ${TMP_DIR}
${TMP_BOOK_DIR}: pdfs: $(PDFS)
mkdir -p ${TMP_BOOK_DIR}
${TMP_SONG_DIR}: midis: pdfs $(MIDIS)
mkdir -p ${TMP_SONG_DIR}
${TMP_MIDI_DIR}: opus: midis $(OPUSFILES)
mkdir -p ${TMP_MIDI_DIR}
${BUILD_OPUS_DIR}: book: $(BOOKPDF)
mkdir -p ${BUILD_OPUS_DIR}
${TMP_SONG_DIR}/%.pdf: ${SONG_DIR}/%.ly ${SONG_DIR}/%.tex booklet: $(BOOKLETPDF)
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
${BUILD_MIDI_DIR}/%.midi: ${TMP_MIDI_DIR}/%-1.midi $(BOOKPDF): | $(PDFDIR) $(OUTDIR)
cp $< $@ @$(CP) $(SRCDIR)/*.tex $(OUTDIR)/
@$(CP) -r lib/* $(OUTDIR)/
@$(CP) -r $(SRCDIR)/images $(OUTDIR)/images
${TMP_MIDI_DIR}/%-1.midi: ${SONG_DIR}/%.ly @$(SED) "s;\musicbooklet;$(LILYPONDSUBST);g" $(SRCDIR)/singalongs.tex > $(OUTPUTFILE).00
lilypond --output=${TMP_MIDI_DIR} ${WORKING_DIR}/$< @$(SED) 's/REVISION/$(shell git log -1 --format="%h")/g' $(OUTPUTFILE).00 > $(OUTPUTFILE)
${BUILD_OPUS_DIR}/%.opus: ${BUILD_MIDI_DIR}/%.midi @$(CD) $(OUTDIR); \
timidity $< -Ow -o - | opusenc - $@ $(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 @$(CP) $(OUTDIR)/singalongs.pdf $(PDFDIR)/$(@F)
latexmk -cd -lualatex -e '$$lualatex=q/lualatex %O -shell-escape %S/' -output-directory=${WORKING_DIR}/${TMP_BOOK_DIR} $<
rm -r ${SRC_DIR}/tmp-ly
${TMP_BOOK_DIR}/%-folio.pdf: ${TMP_BOOK_DIR}/%.pdf $(BOOKLETPDF): $(BOOKPDF)
cd ${TMP_BOOK_DIR} && \ $(PDF2PS) $(BOOKPDF) - | $(PSBOOK) | $(PSTOPS) -pa4 '1:0@1.0(-1.25cm,0cm)' | $(PSNUP) -2 | $(PS2PDF) - $(PDFDIR)/$(@F)
../../bin/makebook -v -t folio -i $(notdir $<) -o $(notdir $@)
#long edge binding $(PDFDIR)/%.pdf: $(SCORESDIR)/%.ly | $(PDFDIR) $(OUTDIR)
${TMP_BOOK_DIR}/%-quarto.pdf: ${TMP_BOOK_DIR}/%.pdf @$(SED) 's/%title/title/g' $< > $(OUTDIR)/$(notdir $<).00
cd ${TMP_BOOK_DIR} && \ @$(SED) 's/\header {/\paper{indent=0\\mm} \\header { tagline=""/g' $(OUTDIR)/$(notdir $<).00 > $(OUTDIR)/$(notdir $<)
../../bin/makebook -v -t quarto -i $(notdir $<) -o $(notdir $@) @$(LILYPOND) --output=$(PDFDIR)/$(basename $(@F)) $(OUTDIR)/$(notdir $<)
${TMP_BOOK_DIR}/%-sexto.pdf: ${TMP_BOOK_DIR}/%.pdf $(MIDIDIR)/%.midi: $(SCORESDIR)/%.ly | $(MIDIDIR) $(OUTDIR)
cd ${TMP_BOOK_DIR} && \ @$(SED) 's/\layout { }/\midi{ \\tempo 4 = $(MIDITEMPO) }/g' $< > $(OUTDIR)/$(notdir $<).00
../../bin/makebook -v -t sexto -i $(notdir $<) -o $(notdir $@) @$(SED) 's/\header/\include "articulate.ly" \\header/g' $(OUTDIR)/$(notdir $<).00 > $(OUTDIR)/$(notdir $<).01
@$(SED) 's/<</\\articulate \\unfoldRepeats <</g' $(OUTDIR)/$(notdir $<).01 > $(OUTDIR)/$(notdir $<)
@$(LILYPOND) --output=$(MIDIDIR)/$(basename $(@F)) $(OUTDIR)/$(notdir $<)
#short edge binding $(OPUSDIR)/%.opus: $(MIDIDIR)/%.midi | $(OPUSDIR)
${TMP_BOOK_DIR}/%-octavo.pdf: ${TMP_BOOK_DIR}/%.pdf @$(TIMIDITY) $< -Ow -o - | $(OPUSENC) - $(OPUSDIR)/$(@F)
cd ${TMP_BOOK_DIR} && \
../../bin/makebook -v -t octavo -i $(notdir $<) -o $(notdir $@)
${BUILD_DIR}/%.pdf: ${TMP_DIR}/%.pdf $(PDFDIR):
cp $< $@ @$(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} $(MIDIDIR):
songs: directories ${LY_PDFS} @$(MKDIR) -p $(MIDIDIR)
midi: directories ${LY_MIDIS}
opus: directories ${LY_OPUS}
all: book songs midi opus
$(OPUSDIR):
@$(MKDIR) -p $(OPUSDIR)
$(OUTDIR):
@$(MKDIR) -p $(OUTDIR)
.PHONY: clean
clean: clean:
rm -rf ${BUILD_DIR} @$(RM) -rf $(PDFDIR) $(MIDIDIR) $(OPUSDIR) $(OUTDIR)
rm -rf ${TMP_DIR}

View File

@ -1,8 +1,6 @@
Sing Alongs Sing Alongs
=========== ===========
[Latest Releases](https://code.vanwa.ch/sebastian/sing-alongs/-/releases)
Motivation Motivation
---------- ----------
@ -20,31 +18,18 @@ with something like [git](http://git-scm.com/).
Development 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. 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
The makefile defines multiple targets: number of songs but lets see ;)
Also, the older songs may not have their own branch yet, so it has to be
- pdfs: builds all songs as single pdfs (without lyrics for now) created when the first correction comes up.
- 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/).
Contact Contact
------- -------
You can reach me at [shugentobler@vanwa.ch](mailto:hugentobler@vanwa.ch)
You can reach me at [sebastian@vanwa.ch](mailto:sebastian@vanwa.ch)

View File

@ -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
# <http://www.gnu.org/licenses/>.
#
#**********************************************************#
# 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 <<End-of-help
makebook v${REVISION}. Copyright (C) 2011, Donald P. Goodman III.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to
redistribute it under certain conditions; see
the GNU GPL v3 for details.
-V: Prints license and version information, then exits
successfully.
-h: Prints this help information, then exist successfully.
-v: Verbose output
-f: Favor front, rather than back, for blanks.
-t: Signature type
-n: Number of signatures per section.
-H: Height of the target page.
-w: Width of the target page.
-d: Horizontal delta.
-D: Vertical delta.
-m: Horizontal offset.
-M: Vertical offset.
-s: Scaling of source pages to target page.
-i: Input file.
-o: Output file.
Please see the man page for complete documentation.
End-of-help
exit 0;
}
# define a for dealing with units; convert to bp ()
unitarg ()
{
if [ ! `echo "$1" | grep '^[\+\|-]*[0-9\.][0-9\.]*\(in\|cm\|pt\|mm\|bp\|pc\|$\)'` ]
then
echo "ERROR: dimension \"$1\" not valid." >&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

186
lib/lyluatex.lua Normal file
View File

@ -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)

69
lib/lyluatex.sty Normal file
View File

@ -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

View File

@ -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 \\ 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 \\ 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{center}
\end{multicols*} \end{multicols*}

View File

@ -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 { }
}

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "Auld Lang Syne" %title = "Auld Lang Syne"
composer = "Robert Burns" composer = "Robert Burns"
} }
@ -37,29 +36,10 @@ melody = \relative a' {
d2. s4 \bar "|." d2. s4 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
} }
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
}

View File

@ -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 { }
}

43
src/scores/Buergerlied.ly Normal file
View File

@ -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 { }
}

View File

@ -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 { }
}

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "Finnegan's Wake" %title = "Tim Finnegan's Wake"
composer = "Traditional" composer = "Traditional"
} }
@ -45,29 +44,10 @@ melody = \relative a' {
e16 e fis8 g \bar "|." e16 e fis8 g \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "The Foggy Dew" %title = "The Foggy Dew"
composer = "Charles ONeill" composer = "Charles ONeill"
} }
@ -45,29 +44,10 @@ melody = \relative g' {
e2 \bar "|." e2 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -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 { }
}

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "The Irish Rover" %title = "The Irish Rover"
composer = "Traditional" composer = "Traditional"
} }
@ -41,29 +40,10 @@ melody = \relative d'' {
g2. s4 \bar "|." g2. s4 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "Johnny I hardly Knew Ye" %title = "Johnny I hardly Knew Ye"
composer = "Traditional" composer = "Traditional"
} }
@ -37,29 +36,10 @@ melody = \relative c' {
a4.( a4) r8 \bar "|." a4.( a4) r8 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -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 { }
}

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "MacPherson's Farewell" %title = "MacPherson's Farewell"
composer = "Robert Burns" composer = "Robert Burns"
} }
@ -37,29 +36,10 @@ melody = \relative g' {
g2. s4 \bar "|." g2. s4 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "Molly Malone" %title = "Molly Malone"
composer = "Traditional" composer = "Traditional"
} }
@ -43,29 +42,10 @@ melody = \relative g' {
} }
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -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 { }
}

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "A Nation Once Again" %title = "A Nation Once Again"
composer = "Thomas Osborne Davis" composer = "Thomas Osborne Davis"
} }
@ -45,29 +44,10 @@ melody = \relative a' {
d2. s4 \bar "|." d2. s4 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "The Parting Glass" %title = "The Parting Glass"
composer = "Traditional" composer = "Traditional"
} }
@ -37,29 +36,10 @@ melody = \relative b' {
g4 e e s \bar "|." g4 e e s \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -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 { }
}

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.2"
\include "articulate.ly"
\header { \header {
title = "Spancil Hill" %title = "Spancil Hill"
composer = "Michael Considine" composer = "Michael Considine"
} }
@ -66,29 +65,10 @@ melody = \relative e'' {
a2) s4 \bar "|." a2) s4 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "The Star of the County Down" %title = "The Star of the County Down"
composer = "Cathal Mac Garvey" composer = "Cathal Mac Garvey"
} }
@ -41,29 +40,10 @@ melody = \relative c' {
} }
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "Whiskey in the Jar" %title = "Whiskey in the Jar"
composer = "Traditional" composer = "Traditional"
} }
@ -46,29 +45,10 @@ melody = \relative fis' {
d2. s4 \bar "|." d2. s4 \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,8 +1,7 @@
\version "2.18.2" \version "2.16.0"
\include "articulate.ly"
\header { \header {
title = "The Wild Rover" %title = "The Wild Rover"
composer = "Traditional" composer = "Traditional"
} }
@ -42,29 +41,10 @@ melody = \relative g' {
g2. \bar "|." g2. \bar "|."
} }
\book { \score {
\score { <<
<< \new ChordNames \chordNames
\new ChordNames \chordNames \new Staff { \melody }
\new Staff { \melody } >>
>> \layout { }
\layout {}
}
}
\book {
\score {
\unfoldRepeats \articulate
<<
\new Voice = "chords" {
\chordNames
}
\new Voice = "melody" {
\melody
}
>>
\midi {
\tempo 4 = 130
}
}
} }

View File

@ -1,3 +1,5 @@
\geometry{a4paper,left=20mm,right=20mm, top=3cm, bottom=3cm}
\setlength{\columnseprule}{0.2pt} \setlength{\columnseprule}{0.2pt}
\hypersetup \hypersetup
@ -14,5 +16,9 @@
pdfcreator={Sebastian Hugentobler}, % creator of the document pdfcreator={Sebastian Hugentobler}, % creator of the document
pdfproducer={Sebastian Hugentobler}, % producer of the document pdfproducer={Sebastian Hugentobler}, % producer of the document
pdfnewwindow=true, % links in new window 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
} }

View File

@ -1,41 +1,22 @@
% !Mode:: "TeX:UTF-8" % !Mode:: "TeX:UTF-8"
\documentclass[11pt, openany, twoside]{scrbook} \documentclass[12pt, a4paper, openany]{scrbook}
\usepackage[utf8]{inputenc}
\usepackage{fontspec} \usepackage{fontspec}
\usepackage{lmodern}
\usepackage{graphicx}
\usepackage{fancyhdr} \usepackage{fancyhdr}
\usepackage[a4paper]{geometry} \usepackage{geometry}
\usepackage{tgschola}
\usepackage{tocloft}
\usepackage[unicode]{hyperref} \usepackage[unicode]{hyperref}
\usepackage{multicol} \usepackage{multicol}
\usepackage{songs}
\usepackage{lyluatex} \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{settings.tex}
\input{headfoot.tex} \input{headfoot.tex}
\begin{document} \begin{document}
\widowpenalties 1 10000
\raggedbottom
\pagenumbering{roman} \pagenumbering{roman}
\input{title.tex} \input{title.tex}
@ -58,16 +39,10 @@
\tableofcontents \tableofcontents
\newpage \clearpage
\pagenumbering{arabic} \pagenumbering{arabic}
\lysetoption{staffsize}{22} \musicbooklet
\lysetoption{quote}{true}
\lysetoption{indent}{false}
\lysetoption{insert}{inline}
\lysetoption{pass-fonts}{true}
\songs
\end{document} \end{document}

View File

@ -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}

View File

@ -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

View File

@ -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)%
}%
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -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
}
}
}

View File

@ -10,12 +10,12 @@
\begin{minipage}{0.5\textwidth} \begin{minipage}{0.5\textwidth}
\begin{flushleft} \large \begin{flushleft} \large
\emph{Project Website:} \\ \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{flushleft}
\end{minipage} \end{minipage}
\begin{minipage}{0.4\textwidth} \begin{minipage}{0.4\textwidth}
\begin{flushright} \large \begin{flushright} \large
\emph{Revision:} \\ \emph{Git Revision:} \\
\texttt{\revision} \\ \texttt{\revision} \\
\end{flushright} \end{flushright}
\end{minipage} \end{minipage}