mirror of
https://github.com/kastdeur/lilydrum.git
synced 2024-12-22 17:23:32 +01:00
Moved Book scripts around,
few edits to music
This commit is contained in:
parent
9ce97ffc8b
commit
2cbc0c9bd6
29 changed files with 170 additions and 202 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,11 +1,11 @@
|
|||
.gitignore
|
||||
*.ps
|
||||
*.pdf
|
||||
*.png
|
||||
*.log
|
||||
*tmp*
|
||||
*.py
|
||||
*.toc
|
||||
*.aux
|
||||
_output/
|
||||
pdf/
|
||||
fullscores/
|
||||
fullscores/*
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
\tenorAB
|
||||
s8
|
||||
|
||||
s8
|
||||
\tenorBA
|
||||
\tenorBB
|
||||
\tenorBC
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
% 4/4 The Pikeman's March
|
||||
% Tenor
|
||||
\version "2.18.2"
|
||||
composerTenor = "E.T. de Boone, 2015"
|
||||
composerTenor = "E.T. de Boone, v0.3, 2015"
|
||||
|
||||
%%music
|
||||
tenorAA = \drummode {
|
||||
|
@ -26,8 +26,16 @@ tenorAB = \drummode {
|
|||
}
|
||||
% Part 2
|
||||
tenorBA = \drummode {
|
||||
d8-_ g
|
||||
d8 g
|
||||
d8 g
|
||||
d8 g
|
||||
|
|
||||
s1*3
|
||||
}
|
||||
tenorBB = \drummode {
|
||||
s1*4
|
||||
}
|
||||
tenorBC = \drummode {
|
||||
}
|
||||
s1*4
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
\version "2.18.2"
|
||||
|
||||
\include "config.ily"
|
||||
\include "notes.side.v1.5.ily"
|
||||
\include "notes.side.v1.6.ily"
|
||||
|
||||
\score {
|
||||
\new PipeBandDrumStaff {
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
\tenorAA
|
||||
\tenorAB
|
||||
|
||||
s8
|
||||
\tenorBA
|
||||
\tenorBB
|
||||
\tenorBC
|
||||
|
|
|
@ -2,27 +2,35 @@
|
|||
% Side
|
||||
\version "2.18.2"
|
||||
composerSide = ""
|
||||
snareA = \drummode {
|
||||
snareAA = \drummode {
|
||||
d16. g32 |
|
||||
d8:32( d8.)-> g16 d4:32( d8) |
|
||||
\dragd d16. d32-> g16. g32 \flamd d8 d4.:32( |
|
||||
d4) d16. g32 d8:32( d8) g8 |
|
||||
\flamd d16. g32 d16. \flamg g32 d16. g32 \flamd d4 d16. g32 |
|
||||
|
||||
d4) d16. g32 d8:32( d8) g8 |
|
||||
\flamd d16. g32 d16. \flamg g32 d16. g32 \flamd d4
|
||||
}
|
||||
snareAB = \drummode {
|
||||
d16. g32 |
|
||||
d8:32( d8.)-> g16 d4:32( d8) |
|
||||
\dragd d16. d32-> g16. g32 \flamd d8 d4:32( d16.) g32 |
|
||||
|
||||
d8:32( g16.) d32-> g16. g32 d8:32( g16.) d32-> g16. g32 |
|
||||
d4.:32( d4)
|
||||
}
|
||||
snareBA = \drummode {
|
||||
d8:32( |
|
||||
g4) \flamd d16. g32 d8:32( g8) \flamd d8 |
|
||||
d32-> g32 d32 g32 d32 g32 d32 g32-> d32 g32 d32 g32 d4-> d8:32( |
|
||||
g4) \flamd d16. g32 d8:32( g8.) g16 |
|
||||
d4.:32( d4) d8:32( |
|
||||
g4) \flamd d16. g32 d8:32( d8) \flamd d8 |
|
||||
d32-> g32 d32 g32 d32 g32 d32 g32-> d32 g32 d32 g32 d4-> d8:32(
|
||||
|
||||
g4) \flamd d16. g32 d8:32( g8) \flamd d8 |
|
||||
g4) \flamd d16. g32 d8:32( d8.) g16 |
|
||||
d4.:32( d4)
|
||||
}
|
||||
snareBB = \drummode {
|
||||
d8:32( |
|
||||
g4) \flamd d16. g32 d8:32( d8) \flamd d8 |
|
||||
d32-> g32 d32 g32 d32 g32 d32 g32-> d32 g32 d32 g32 d4-> \flamd d16. g32 |
|
||||
|
||||
d8:32( g16.) d32-> g16. g32 d8:32( g16.) d32-> g16. g32 |
|
||||
d4.:32( d4)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,24 +6,26 @@
|
|||
\score {
|
||||
\new PipeBandDrumStaff {
|
||||
\global
|
||||
<<
|
||||
{
|
||||
\repeat volta 2 { \part \line \break } \break
|
||||
\part \line \bar "||" \break
|
||||
\part \line \bar "|."
|
||||
}
|
||||
{
|
||||
\snareA s8
|
||||
<<
|
||||
{
|
||||
\repeat volta 2 { \part \line \break } \break
|
||||
\repeat volta 2 { \part \halfline \break }
|
||||
\alternative{ {\part \halfline \break}{\part \halfline \break} }
|
||||
\bar "|."
|
||||
}
|
||||
{
|
||||
\snareAA \snareAB s8
|
||||
|
||||
\snareBA s8
|
||||
\snareA s8
|
||||
}
|
||||
>>
|
||||
}
|
||||
\header {
|
||||
title = \title
|
||||
meter = \meter
|
||||
instrument = \instrumentSide
|
||||
composer = \composerSide
|
||||
}
|
||||
}
|
||||
\snareBA s8
|
||||
\snareBB s8
|
||||
\snareAB s8
|
||||
}
|
||||
>>
|
||||
}
|
||||
\header {
|
||||
title = \title
|
||||
meter = \meter
|
||||
instrument = \instrumentSide
|
||||
composer = \composerSide
|
||||
}
|
||||
}
|
||||
|
|
7
book/.gitignore
vendored
Normal file
7
book/.gitignore
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
*.pdf
|
||||
*.aux
|
||||
*.log
|
||||
*.toc
|
||||
images/*
|
||||
scores/*
|
||||
tmp/*
|
|
@ -17,8 +17,8 @@ for ins in tenor;
|
|||
do
|
||||
printf "\\documentclass{tex/score_book}
|
||||
|
||||
\\title{Seaforth Highlanders of Holland\\\\ %s Scores}
|
||||
\\author{Eric Teunis de Boone}
|
||||
\\title{Seaforth Highlanders of Holland\\\\ %s Scores}
|
||||
\\author{Eric Teunis de Boone}
|
||||
|
||||
\\begin{document}
|
||||
|
||||
|
@ -42,9 +42,9 @@ done;
|
|||
|
||||
echo "All setup!"
|
||||
|
||||
read -p "Press [Enter] to compile *.tex"
|
||||
#read -p "Press [Enter] to compile *.tex"
|
||||
|
||||
for f in ./*.tex;
|
||||
do
|
||||
$LATEXCMD $f
|
||||
done;
|
||||
#for f in ./*.tex;
|
||||
#do
|
||||
# $LATEXCMD $f
|
||||
#done;
|
|
@ -12,6 +12,7 @@ class MakeBook:
|
|||
RUN_DIR = os.path.abspath(os.curdir)
|
||||
SCORES_DIR = './scores/'
|
||||
LY_DIR = '../'
|
||||
ORDER_FILE = 'order.txt'
|
||||
INSTRUMENTS = ['full','drums', 'pipes', 'bass', 'tenor', 'side','snare']
|
||||
def __init__(self):
|
||||
|
||||
|
@ -43,14 +44,17 @@ class MakeBook:
|
|||
|
||||
self.fwrite(u'\\addcontentsline{toc}{section}{Standards}')
|
||||
for d in standards:
|
||||
self.vprint()
|
||||
self.vprint(os.path.join(self.SCORES_DIR,d))
|
||||
self.path_walker(os.path.join(self.SCORES_DIR,d), level=1, content_line_level=1)
|
||||
self.fwrite(u'\\addcontentsline{toc}{section}{Marches}')
|
||||
for d in marches:
|
||||
self.vprint()
|
||||
self.vprint(os.path.join(self.SCORES_DIR,d))
|
||||
self.path_walker(os.path.join(self.SCORES_DIR,d), level=1, content_line_level=2)
|
||||
|
||||
for d in tune_dirs:
|
||||
self.vprint()
|
||||
self.vprint(os.path.join(self.SCORES_DIR,d))
|
||||
self.path_walker(os.path.join(self.SCORES_DIR,d))
|
||||
except IOError:
|
||||
|
@ -59,8 +63,10 @@ class MakeBook:
|
|||
self.fout.close()
|
||||
raise
|
||||
|
||||
def vprint(self,line):
|
||||
def vprint(self,line = None):
|
||||
if self.args.verbose:
|
||||
if line is None:
|
||||
line = ''
|
||||
print(line)
|
||||
|
||||
def fwrite(self,line):
|
||||
|
@ -139,24 +145,36 @@ class MakeBook:
|
|||
if level < content_line_level:
|
||||
self.fwrite(u'\\mysection{'+('sub'*level)+'section}{'+a[a.rfind('/')+1:].replace('_',' ').replace('-','/').title()+'}')
|
||||
newline = False
|
||||
for root, dirs, files in os.walk(a,False):
|
||||
for f in files:
|
||||
if not f.endswith('.pdf'):
|
||||
continue
|
||||
if self.args.instrument:
|
||||
instr_in_file = False
|
||||
for instr in self.args.instrument:
|
||||
if instr in f:
|
||||
self.vprint(instr)
|
||||
instr_in_file = True
|
||||
break
|
||||
if not instr_in_file:
|
||||
continue
|
||||
# Include file
|
||||
if newline:
|
||||
self.fwrite(u'\\newpage')
|
||||
|
||||
newline = True
|
||||
self.include_pdf(os.path.join(root,f), level+1)
|
||||
if os.path.isfile(os.path.join(a, 'order.txt')):
|
||||
self.vprint('Found order')
|
||||
with open(os.path.join(a, self.ORDER_FILE)) as f:
|
||||
line = f.readline().rstrip('\n')
|
||||
while line:
|
||||
self.path_walker(os.path.join(a,line), level+1)
|
||||
line = f.readline().rstrip('\n')
|
||||
else:
|
||||
for root, dirs, files in os.walk(a,False):
|
||||
for f in files:
|
||||
if not f.endswith('.pdf'):
|
||||
self.vprint('F! '+f)
|
||||
continue
|
||||
if self.args.instrument:
|
||||
instr_in_file = False
|
||||
for instr in self.args.instrument:
|
||||
if instr in f:
|
||||
self.vprint(instr)
|
||||
instr_in_file = True
|
||||
break
|
||||
if not instr_in_file:
|
||||
self.vprint('F! '+f)
|
||||
continue
|
||||
# Include file
|
||||
self.vprint('F '+f)
|
||||
if newline:
|
||||
self.fwrite(u'\\newpage')
|
||||
|
||||
newline = True
|
||||
self.include_pdf(os.path.join(root,f), level+1)
|
||||
# Run above
|
||||
MakeBook();
|
|
@ -1,100 +0,0 @@
|
|||
\addcontentsline{toc}{section}{Marches}
|
||||
\mysection{subsection}{Standards}
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{2/4 Standards (side)},p2_4_standards}, pagecommand={}]{./scores/standards/standards-24_standards.side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 1 (side)},p3_4_standards_nsetting_1}, pagecommand={}]{./scores/standards/standards-34_standards1.side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 2 (side)},p3_4_standards_n_setting_2}, pagecommand={}]{./scores/standards/standards-34_standards2.side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{3/4 Standards Setting 3 (side)},p3_4_standards_n_setting_3}, pagecommand={}]{./scores/standards/standards-34_standards3.side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{4/4 Standards (side)},p4_4_standards}, pagecommand={}]{./scores/standards/standards-44_standards.side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standards (side)},p6_8_standards}, pagecommand={}]{./scores/standards/standards-68_standards.side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standard (bass)},p6_8_standard}, pagecommand={}]{./scores/standards/standards-standards.bass.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{6/8 Standards (tenor)},p6_8_standards}, pagecommand={}]{./scores/standards/standards-standards.tenor.pdf}
|
||||
\mysection{subsection}{2/4 Marches}
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Black Bear (side)},pblack_bear}, pagecommand={}]{./scores/2-4_marches/black_bear/2-4_marches-black_bear-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Duncan McInnes (side)},pduncan_mcinnes}, pagecommand={}]{./scores/2-4_marches/duncan_mcinness/2-4_marches-duncan_mcinness-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{MacKenzie Highlanders (side)},pmackenzie_highlanders}, pagecommand={}]{./scores/2-4_marches/mackenzie_highlanders/2-4_marches-mackenzie_highlanders-side.alt.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{MacKenzie Highlanders (side)},pmackenzie_highlanders}, pagecommand={}]{./scores/2-4_marches/mackenzie_highlanders/2-4_marches-mackenzie_highlanders-side.pdf}
|
||||
\mysection{subsection}{3/4 Marches}
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Castle Dangerous (tenor)},pcastle_dangerous}, pagecommand={}]{./scores/3-4_marches/castle_dangerous/3-4_marches-castle_dangerous-tenor.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{On the Road to Passchendaele (side)},pon_the_road_to_passchendaele}, pagecommand={}]{./scores/3-4_marches/on_the_road_to_passchendaele/3-4_marches-on_the_road_to_passchendaele-side.pdf}
|
||||
\mysection{subsection}{4/4 Marches}
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{51st Highland Division (side)},p51st_highland_division}, pagecommand={}]{./scores/4-4_marches/51st_highland_division/4-4_marches-51st_highland_division-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Flett from Flotta (side)},pflett_from_flotta}, pagecommand={}]{./scores/4-4_marches/flett_from_flotta/4-4_marches-flett_from_flotta-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Minstrel Boy (side)},pminstrel_boy}, pagecommand={}]{./scores/4-4_marches/minstrel_boy/4-4_marches-minstrel_boy-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Rowan Tree (side)},prowan_tree}, pagecommand={}]{./scores/4-4_marches/rowan_tree/4-4_marches-rowan_tree-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Scotland the Brave (side)},pscotland_the_brave}, pagecommand={}]{./scores/4-4_marches/scotland_the_brave/4-4_marches-scotland_the_brave-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool (drums)},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-drums.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool (side)},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Leaving of Liverpool (tenor)},pthe_leaving_of_liverpool}, pagecommand={}]{./scores/4-4_marches/the_leaving_of_liverpool/4-4_marches-the_leaving_of_liverpool-tenor.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Old Rustic Bridge (tenor)},pthe_old_rustic_bridge}, pagecommand={}]{./scores/4-4_marches/the_old_rustic_bridge/4-4_marches-the_old_rustic_bridge-tenor.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March (drums)},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-drums.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March (side)},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{The Pikeman's March (tenor)},pthe_pikeman_s_march}, pagecommand={}]{./scores/4-4_marches/the_pikemans_march/4-4_marches-the_pikemans_march-tenor.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Wings (side)},pwings}, pagecommand={}]{./scores/4-4_marches/wings/4-4_marches-wings-side.pdf}
|
||||
\mysection{subsection}{5/4 Marches}
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (bass)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-bass.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (drums)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-drums.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (side)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Cullen Bay (tenor)},pcullen_bay}, pagecommand={}]{./scores/5-4_marches/cullen_bay/5-4_marches-cullen_bay-tenor.pdf}
|
||||
\mysection{subsection}{6/8 Marches}
|
||||
\includepdf[pages=-, addtotoc={1,subsubsection,3,{Hills of Glenorchy (side)},phills_of_glenorchy}, pagecommand={}]{./scores/6-8_marches/hills_of_glenorchy/6-8_marches-hills_of_glenorchy-side.pdf}
|
||||
\mysection{section}{Hornpipes}
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Itchy Fingers (pipes) (side)},pitchy_fingers}, pagecommand={}]{./scores/hornpipes/itchy_fingers/hornpipes-itchy_fingers-side.pdf}
|
||||
\mysection{section}{Jigs}
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks (drums)},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-drums.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks (side)},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Seaforth Sticks (tenor)},pseaforth_sticks}, pagecommand={}]{./scores/jigs/seaforth_sticks/jigs-seaforth_sticks-tenor.pdf}
|
||||
\mysection{section}{Strathspeys}
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{A. A. Cameron's Strathspey (side)},pa._a._cameron_s_strathspey}, pagecommand={}]{./scores/strathspeys/aa_camerons/strathspeys-aa_camerons-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (bass)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-bass.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (drums)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-drums.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (full)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-full.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (pipes)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-pipes.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (side)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Lady MacKenzie of Fairburn (tenor)},plady_mackenzie_of_fairburn}, pagecommand={}]{./scores/strathspeys/lady_mackenzie_of_fairburn/strathspeys-lady_mackenzie_of_fairburn-tenor.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (bass)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-bass.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (drums)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-drums.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (side)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-side.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (tenor)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-molly_connell-tenor.pdf}
|
||||
\newpage
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Molly Connell (side)},pmolly_connell}, pagecommand={}]{./scores/strathspeys/molly_connell/strathspeys-rolls.side.pdf}
|
||||
\mysection{section}{Reels}
|
||||
\mysection{section}{Other}
|
||||
\includepdf[pages=-, addtotoc={1,subsection,2,{Band of Brothers (snare)},pband_of_brothers}, pagecommand={}]{./scores/other/other-band_of_brothers.snare.pdf}
|
89
makedrum
89
makedrum
|
@ -51,6 +51,12 @@ class MakeDrum:
|
|||
action='store_true', dest='view_spacing', default=False,
|
||||
help='Turn on "Paper.annotatespacing".')
|
||||
|
||||
parser.add_argument('-g','--generated',
|
||||
dest='gen_out', default=self.TMP_DIR,
|
||||
help='Put generated lilyfiles in $gen_out')
|
||||
parser.add_argument('--no-compile', default=True,
|
||||
action='store_false', dest='compile',
|
||||
help='Do not compile generated Lilypond files')
|
||||
parser.add_argument('--no-log',
|
||||
action='store_false', dest='log', default=True,
|
||||
help='Do not generate log files.')
|
||||
|
@ -61,7 +67,7 @@ class MakeDrum:
|
|||
dest='out_dir', default='pdf',
|
||||
help='Output dir, for lilypond. If it doesn\'t exist, try to create it')
|
||||
parser.add_argument('music_file',
|
||||
default='', nargs='+',
|
||||
default='', nargs='*',
|
||||
help='file to process')
|
||||
parser.add_argument('-@', '--list_file',
|
||||
dest='list_file', default='',
|
||||
|
@ -86,6 +92,11 @@ class MakeDrum:
|
|||
if self.args.list_file != '':
|
||||
self.args.music_file.append(open(self.args.list_file, 'r').readlines())
|
||||
close(self.args.list_file)
|
||||
# Check for files
|
||||
if not self.args.music_file:
|
||||
parser.print_usage()
|
||||
return
|
||||
|
||||
|
||||
# Clean up of files
|
||||
self.remove_tmp_dir = self.args.clean
|
||||
|
@ -103,20 +114,14 @@ class MakeDrum:
|
|||
|
||||
os.chdir(self.MASTER_DIR)
|
||||
for file_path in self.args.music_file:
|
||||
self.processit(self.TMP_DIR, os.path.join(self.RUN_DIR, file_path))
|
||||
self.processit(self.TMP_DIR, os.path.join(self.RUN_DIR, file_path), self.args.gen_out, self.args.compile)
|
||||
|
||||
#if not
|
||||
#os.rmdir(self.TMP_DIR)
|
||||
|
||||
os.chdir(self.RUN_DIR)
|
||||
|
||||
def processit(self, tmp_dir, file):
|
||||
if self.args.log:
|
||||
logfile = os.path.join(self.TMP_DIR, os.path.relpath(file).replace(".ly", '').replace('/', '-')+'.log')
|
||||
log = ' > '+logfile+' 2>&1'
|
||||
else:
|
||||
log = ''
|
||||
|
||||
def processit(self, tmp_dir, file, gen_out, compile):
|
||||
if self.args.format is None:
|
||||
if file.endswith(".book"):
|
||||
header_format = "header_book"
|
||||
|
@ -127,27 +132,49 @@ class MakeDrum:
|
|||
|
||||
tmp_file = self.maketemplate(tmp_dir, file, header_format)
|
||||
|
||||
print ('Compiling ', file, end=' ', flush=True)
|
||||
if not self.args.log:
|
||||
print()
|
||||
if gen_out is not None and gen_out != tmp_dir:
|
||||
new_tmp_file = os.path.basename(tmp_file).replace(self.TMP_PREFIX, '');
|
||||
print ('Moving ', tmp_file, ' to ', new_tmp_file, end=' ', flush=True)
|
||||
gen_dir = os.path.join(self.RUN_DIR, gen_out);
|
||||
# if not dir $gen_out, make it
|
||||
if not os.path.exists(gen_dir):
|
||||
try: os.makedirs(gen_dir)
|
||||
except:
|
||||
print('[Error]')
|
||||
print(' ! Seems like the {} directory cannot be created'.format(gen_dir))
|
||||
return
|
||||
# mv file to dir, remove self.TMP_PREFIX
|
||||
os.rename(tmp_file, os.path.join(gen_dir, new_tmp_file))
|
||||
tmp_file = new_tmp_file
|
||||
print('[OK]')
|
||||
|
||||
lilyout = os.path.join(os.path.curdir, self.args.out_dir, os.path.basename(tmp_file).replace(self.TMP_PREFIX, '').replace(".ly", ''))
|
||||
lilycmd = self.LILYPOND+' --pdf --output='+lilyout+' '+tmp_file+log
|
||||
|
||||
if os.system(lilycmd) != 0:
|
||||
self.remove_tmp_dir = False
|
||||
print ('[Error]')
|
||||
if compile:
|
||||
if self.args.log:
|
||||
print (' ! Did not compile, please see the log at ', logfile)
|
||||
else :
|
||||
print ('[OK]')
|
||||
logfile = os.path.join(self.TMP_DIR, os.path.relpath(file).replace(".ly", '').replace('/', '-')+'.log')
|
||||
log = ' > '+logfile+' 2>&1'
|
||||
else:
|
||||
log = ''
|
||||
|
||||
if self.args.clean:
|
||||
#remove files
|
||||
print ('Compiling ', file, end=' ', flush=True)
|
||||
if not self.args.log:
|
||||
print()
|
||||
lilyout = os.path.join(self.RUN_DIR, self.args.out_dir, os.path.basename(tmp_file).replace(self.TMP_PREFIX, '').replace(".ly", ''))
|
||||
print (lilyout)
|
||||
lilycmd = self.LILYPOND+' --pdf --output='+lilyout+' '+tmp_file+log
|
||||
|
||||
if os.system(lilycmd) != 0:
|
||||
self.remove_tmp_dir = False
|
||||
print ('[Error]')
|
||||
if self.args.log:
|
||||
os.remove(logfile)
|
||||
os.remove(tmp_file)
|
||||
|
||||
print (' ! Did not compile, please see the log at ', logfile)
|
||||
else :
|
||||
print ('[OK]')
|
||||
|
||||
if self.args.clean:
|
||||
#remove files
|
||||
if self.args.log:
|
||||
os.remove(logfile)
|
||||
os.remove(tmp_file)
|
||||
|
||||
def maketemplate(self, tmp_dir, file, header_format):
|
||||
lily_includes = ''
|
||||
|
@ -157,11 +184,9 @@ class MakeDrum:
|
|||
for ext in ['full', 'side', 'tenor', 'bass', 'drum', 'snare']:
|
||||
if ext in file:
|
||||
include_drum_file = True
|
||||
|
||||
for ext in ['full', 'pipes']:
|
||||
if ext in file:
|
||||
include_pipe_file = True
|
||||
|
||||
if include_drum_file:
|
||||
lily_includes = lily_includes + u"""
|
||||
\\include \""""+self.args.lilydrum+"""\"
|
||||
|
@ -178,14 +203,14 @@ class MakeDrum:
|
|||
out_file.write(u'\ufeff')
|
||||
|
||||
out_file.write(u"""
|
||||
% Generated from """+file+""" by """+__file__+"""
|
||||
% Generated from """+file+""" by """+__file__+""" version """+self.VERSION+"""
|
||||
|
||||
\\version "2.18.0"
|
||||
|
||||
#(ly:set-option 'point-and-click #f)
|
||||
"""+ lily_includes +"""
|
||||
|
||||
\\include \""""+header_format+""".ily"
|
||||
\\include \""""+os.path.join(os.path.abspath(self.MASTER_DIR), header_format.strip(".ily")+""".ily""")+"""\"
|
||||
|
||||
#(set-global-staff-size """+self.args.staffsize+""")
|
||||
#(set-default-paper-size \""""+self.args.papersize+"""\" '"""+self.args.orientation+""")
|
||||
|
@ -204,7 +229,7 @@ class MakeDrum:
|
|||
# Rewrite includes to absolute location of file
|
||||
incline = line.replace('\\include', '').strip('"\' ')
|
||||
if not incline.startswith('\\'): #already absolute
|
||||
incline = os.path.join(os.path.relpath(os.path.dirname(file)), incline)
|
||||
incline = os.path.join(os.path.abspath(os.path.dirname(file)), incline)
|
||||
line = "\\include \""+incline+"\""
|
||||
if printit:
|
||||
out_file.write(line.replace('\r', '')+'\n')
|
||||
|
@ -212,6 +237,4 @@ class MakeDrum:
|
|||
|
||||
# Return tmp_file_path
|
||||
return tmp_file
|
||||
|
||||
|
||||
MakeDrum();
|
||||
|
|
|
@ -4,25 +4,25 @@
|
|||
composerSide = "v1.1, 2015"
|
||||
snareA = \drummode {
|
||||
\flamddr d4 \flam g8.[\fr d16:64(] d8.[) \dragddr d16] d8.[ \fr g16] |
|
||||
d8.:64[(-> g16]) \triplet { d16[ g d g d8]} \triplet { g8[ d8 \flam g8] } \flam d8.[ g16] \dr |
|
||||
d8.:64[(-> g16]) \triplet { d16[ g d g d8]} \triplet { g8[ d8 \flamddr g8] } \flam d8.[ \fr g16] |
|
||||
|
||||
d16:64[( d8.]) \fr g8.[ \drag d16] \triplet { d16[ g d g d8] } g8.[ g16] \dr|
|
||||
\flamd \triplet { d8 g d } \flam g8.[ \flam g16] \triplet { d16 g d g d8 } g8 \fr
|
||||
d16:64[( d8.]) g8.[ \drag d16] \triplet { d16[ g d g d8] } g8.[ g16] |
|
||||
\flamddr \triplet { d8 \fr g d } \flamddr g8.[ \flam g16] \triplet { d16 g d g d8 } g8 \fr
|
||||
}
|
||||
|
||||
snareBA = \drummode {
|
||||
\partial 8 g8 \dr |
|
||||
d4:32( d8.[) \drag d16] \fr \triplet { d16[ g d g d8] } g8.[ g16] \dr |
|
||||
\drag d16[ d8.] \flam d8.[ \flam g16] \fr \triplet { d16[ g d g d8] } \triplet { g8[ d g] \dr } |
|
||||
\drag d16[ d8.] \flam d8.[ \flam g16] \fr \triplet { d16[ g d g d8] } \triplet { g8[ d g] } |
|
||||
|
||||
\flamd \triplet { d8[ \fr g16 g16 d8] } g8.[ g16]\dr \flamd \triplet { d8[->\fr g16 g16 d8] } g8.[ g16] \dr |
|
||||
\flamd \triplet { d8[ g d] } \flam g8.[ \flam g16] \triplet { d16[ g d g d8] } g8 s8 \fr |
|
||||
\flamddr \triplet { d8[ \fr g16 g16 d8] } g8.[ g16] \flamddr \triplet { d8[\fr g16 g16 d8] } g8.[ g16] |
|
||||
\flamddr \triplet { d8[ \fr g d] } \flamddr g8.[ \flam g16] \triplet { d16[ g d g d8] } g8 s8 \fr |
|
||||
}
|
||||
snareBB = \drummode {
|
||||
\partial 8 g8 |
|
||||
d4:32( d8.[) \drag d16] \triplet { d16[ g d g d8] } g8.[ g16] |
|
||||
\drag d16[ d8.] \flam d8.[ \flam g16] \triplet { d16[ g d g d8] } \triplet { g8[\> d g] } |
|
||||
\drag d16[ d8.] \flam d8.[ \flam g16] \triplet { d16[ g d g d8] } \triplet { g8[\> d g]\! } |
|
||||
|
||||
\flam d4 \flam g8.[\! d16:64]( d8.[) \drag d16] d8.[ g16] |
|
||||
\flam d4 \flam g8.[ d16:64]( d8.[) \drag d16] d8.[ g16] |
|
||||
\flamd \triplet { d8[ g d] } \flam g8.[ \flam g16] \triplet { d16[ g d g d8] } g8 s8 |
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue