1
0
Fork 0
mirror of https://github.com/kastdeur/lilydrum.git synced 2024-12-22 17:23:32 +01:00

First separated

This commit is contained in:
Eric Teunis de Boone 2016-02-21 09:10:00 +01:00
parent c6a9c95632
commit a6e449a91b
9 changed files with 16 additions and 7 deletions

0
lilydrum/embellishments.ily Normal file → Executable file
View file

0
lilydrum/flourish_symbols/butterfly.eps Normal file → Executable file
View file

0
lilydrum/flourish_symbols/st_andrews_crss.eps Normal file → Executable file
View file

0
lilydrum/flourish_symbols/stop.eps Normal file → Executable file
View file

0
lilydrum/flourishing.ily Normal file → Executable file
View file

11
lilydrum/layout_tweaks.ily Normal file → Executable file
View file

@ -95,6 +95,15 @@ drumPitchNames =
\accepts "PipeBandDrumStaff" \accepts "PipeBandDrumStaff"
} }
} }
\midi {
\context {
\DrumStaff
\name PipeBandDrumStaff
\alias DrumStaff
\override DrumStaff.midiInstrument = #"drums"
}
}
% =================================================== % % =================================================== %
% *Shorts* for Naming % % *Shorts* for Naming %
@ -111,4 +120,4 @@ shortInstrumentPipes = "P."
composerSide = "" composerSide = ""
composerTenor = "" composerTenor = ""
composerBass = "" composerBass = ""
composerPipes = "" composerPipes = ""

0
lilydrum/musical_functions.ily Normal file → Executable file
View file

0
lilydrum/special_sticking.ily Normal file → Executable file
View file

View file

@ -11,10 +11,10 @@ from argparse import ArgumentParser
class MakeDrum: class MakeDrum:
LILYPOND = 'lilypond' LILYPOND = 'lilypond'
VERSION = '0.9.5' VERSION = '0.9.5'
TMP_DIR = './tmp'
TMP_PREFIX = 'tmp_'
MASTER_DIR = os.path.dirname(os.path.abspath(__file__)) MASTER_DIR = os.path.dirname(os.path.abspath(__file__))
RUN_DIR = os.path.abspath(os.curdir) RUN_DIR = os.path.abspath(os.curdir)
TMP_DIR = './tmp'
TMP_PREFIX = 'tmp_'
def __init__(self): def __init__(self):
# Gather options and create the template file # Gather options and create the template file
@ -29,7 +29,7 @@ class MakeDrum:
help='show Lilypond version and exit') help='show Lilypond version and exit')
parser.add_argument('-x', '--drumfile', parser.add_argument('-x', '--drumfile',
dest='lilydrum', default='lilydrum.ly', dest='lilydrum', default=os.path.join(self.MASTER_DIR,'lilydrum.ly'),
help='Use the specified file for drums') help='Use the specified file for drums')
parser.add_argument('-c', '--pipefile', parser.add_argument('-c', '--pipefile',
dest='lilypipe', default='bagpipe.ly', dest='lilypipe', default='bagpipe.ly',
@ -115,14 +115,12 @@ class MakeDrum:
print('Seems like no output directory can be created') print('Seems like no output directory can be created')
return return
os.chdir(self.MASTER_DIR)
for file_path in self.args.music_file: for file_path in self.args.music_file:
self.processit(self.TMP_DIR, os.path.join(self.RUN_DIR, file_path), self.args.gen_out, self.args.compile) self.processit(self.TMP_DIR, os.path.join(self.RUN_DIR, file_path), self.args.gen_out, self.args.compile)
#if not #if not
#os.rmdir(self.TMP_DIR) #os.rmdir(self.TMP_DIR)
os.chdir(self.RUN_DIR)
def processit(self, tmp_dir, file, gen_out, compile): def processit(self, tmp_dir, file, gen_out, compile):
tmp_file = self.maketemplate(tmp_dir, file) tmp_file = self.maketemplate(tmp_dir, file)
@ -196,8 +194,10 @@ class MakeDrum:
lily_includes = lily_includes + "\n\\include \"{}\"".format(f) lily_includes = lily_includes + "\n\\include \"{}\"".format(f)
# set up a tmp file with template and file combined # set up a tmp file with template and file combined
tmp_file = os.path.join(tmp_dir, self.TMP_PREFIX + os.path.relpath(file).replace('/', '-')) tmp_file = os.path.join(tmp_dir, self.TMP_PREFIX + os.path.relpath(file).replace('../music-','',1).replace('/', '-'))
print(file + ' is to be templated')
print(tmp_file + ' is templated file')
out_file = codecs.open(tmp_file, 'w+', 'utf8') out_file = codecs.open(tmp_file, 'w+', 'utf8')
out_file.write(u'\ufeff') out_file.write(u'\ufeff')