e= self.end_chord
if e and s:
- s.note_suffix = s.note_suffix + '('
- e.note_prefix = ')' + e.note_prefix
+ s.note_suffix = s.note_suffix + '-('
+ e.note_prefix = e.note_suffix + '-)'
else:
sys.stderr.write ("\nOrphaned slur")
-
+
+
class Voice:
def __init__ (self):
self.entries = []
def last_chord (self):
return self.chords[-1]
+
def add_chord (self, ch):
self.chords.append (ch)
self.entries.append (ch)
v.number = i
i = i+1
def set_clef (self, letter):
- clstr = clef_table[letter]
- self.voices[0].add_nonchord (Clef (clstr))
-
+ if clef_table.has_key (letter):
+ clstr = clef_table[letter]
+ self.voices[0].add_nonchord (Clef (clstr))
+ else:
+ sys.stderr.write ("Clef type `%c' unknown\n" % letter)
def current_voice (self):
return self.voices[self.voice_idx]
for p in self.pitches:
if str:
str = str + ' '
- str = str + pitch_to_lily_string (p) + sd
-
- for s in self.scripts:
- str = str + '-' + s
+ str = str + pitch_to_lily_string (p)
- str = self.note_prefix +str + self.note_suffix
-
if len (self.pitches) > 1:
- str = '<%s>' % str
+ str = '<<%s>>' % str
elif len (self.pitches) == 0:
- str = 'r' + sd
+ str = 'r'
+ str = str + sd
+ for s in self.scripts:
+ str = str + '-' + s
+
+ str = self.note_prefix + str + self.note_suffix
str = self.chord_prefix + str + self.chord_suffix
return str
numbers = numbers + map (atonum, opening)
(no_staffs, no_instruments, timesig_num, timesig_den, ptimesig_num,
- ptimesig_den, pickup_beats,keysig_number) = tuple (numbers[0:8])
+ esig_den, pickup_beats,keysig_number) = tuple (numbers[0:8])
(no_pages,no_systems, musicsize, fracindent) = tuple (numbers[8:])
# ignore this.
ls = open (fn).readlines ()
def subst(s):
return re.sub ('%.*$', '', s)
+
ls = map (subst, ls)
+ ls = filter (lambda x: x <> '\n', ls)
ls = self.parse_header (ls)
left = string.join (ls, ' ')
- print left
+# print left
self.parse_body (left)
for c in self.staffs:
c.calculate ()
PMX is a Musixtex preprocessor written by Don Simons, see
http://www.gmd.de/Misc/Music/musixtex/software/pmx/
-Report bugs to bug-gnu-music@gnu.org.
+Report bugs to bug-lilypond@gnu.org.
Written by Han-Wen Nienhuys <hanwen@cs.uu.nl>
""")
and you are welcome to change it and/or distribute copies of it under
certain conditions. Invoke as `midi2ly --warranty' for more information.
-Copyright (c) 2000 by Han-Wen Nienhuys <hanwen@cs.uu.nl>
+Copyright (c) 2000--2003 by Han-Wen Nienhuys <hanwen@cs.uu.nl>
""" % version)
def identify():
sys.stderr.write ("%s from LilyPond %s\n" % (program_name, version))