summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3c3036f)
* scripts/midi2ly.py (dump_chord): idem
* scripts/etf2ly.py (version): idem
* scripts/pmx2ly.py (Slur.calculate): new chord syntax
* scripts/mup2ly.py (pre_processor_commands): new chord syntax
2002-12-24 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2002-12-24 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ * scripts/musedata2ly.py (): idem
+
+ * scripts/midi2ly.py (dump_chord): idem
+
+ * scripts/etf2ly.py (version): idem
+
+ * scripts/pmx2ly.py (Slur.calculate): new chord syntax
+
+ * scripts/mup2ly.py (pre_processor_commands): new chord syntax
+
* scm/tex.scm (tex-output-expression): remove eval compat
glut. Other output files too.
* scm/tex.scm (tex-output-expression): remove eval compat
glut. Other output files too.
sarabandeCelloScripts = \notes{
}
sarabandeCelloScripts = \notes{
}
- #(warn "FIXME: Setting beamed lengths")
sarabandeCelloStaff = \context Staff <
sarabandeCelloStaff = \context Staff <
- %%#(warn "FIXME: Setting beamed lengths")
- %%\notes c4*0-#(warn "FIXME: Setting beamed lengths")
- \property Staff.Stem \set #'beamed-lengths = #'(3.26)
-
\sarabandeA
\sarabandeCelloGlobal
\sarabandeCelloScripts
\sarabandeA
\sarabandeCelloGlobal
\sarabandeCelloScripts
+#
+# Convert to new chord styles.
+#
(str, num,den,current_dots) = parse_duration (str, parser_state)
(str, num,den,current_dots) = parse_duration (str, parser_state)
if re.match('[ \t]*\)', str):
str = string.lstrip (str)
if re.match('[ \t]*\)', str):
str = string.lstrip (str)
- if slur_end:
- voices_append ('%s' % ')' *slur_end )
-
bar_acc = get_bar_acc(notename, octave, parser_state)
pit = pitch_to_lilypond_name(notename, acc, bar_acc, global_key[notename])
oct = octave_to_lilypond_quotes (octave)
bar_acc = get_bar_acc(notename, octave, parser_state)
pit = pitch_to_lilypond_name(notename, acc, bar_acc, global_key[notename])
oct = octave_to_lilypond_quotes (octave)
if not parser_state.parsing_tuplet:
voices_append ("}")
if slur_begin:
if not parser_state.parsing_tuplet:
voices_append ("}")
if slur_begin:
- voices_append ('%s' % '(' * slur_begin )
+ voices_append ('-(' * slur_begin )
+ if slur_end:
+ voices_append ('-)' *slur_end )
+
if not cs or not ce:
raise IndexError
if not cs or not ce:
raise IndexError
- cs.note_suffix = '(' + cs.note_suffix
- ce.note_prefix = ce.note_prefix + ')'
+ cs.note_suffix = '-(' + cs.note_suffix
+ ce.note_suffix = ce.note_suffix + '-)'
+
except IndexError:
sys.stderr.write ("""\nHuh? Slur no %d between (%d,%d), with %d notes""" % (self.number, startnote, endnote, len (chords)))
except IndexError:
sys.stderr.write ("""\nHuh? Slur no %d between (%d,%d), with %d notes""" % (self.number, startnote, endnote, len (chords)))
- s = s + '%s%d%s' % (nn, self.duration[0], '.'* self.duration[1])
- s = 'r%d%s' % (self.duration[0] , '.'* self.duration[1])
- s = self.note_prefix + s + self.note_suffix
if len (self.pitches) > 1:
if len (self.pitches) > 1:
+ s = '<< %s >>' % s
+
+ s = s + '%d%s' % (self.duration[0], '.'* self.duration[1])
+ s = self.note_prefix + s + self.note_suffix
s = self.chord_prefix + s + self.chord_suffix
s = self.chord_prefix + s + self.chord_suffix
+ def dump (self, dump_dur = 1):
global reference_note
s = chr ((self.notename + 2) % 7 + ord ('a'))
s = s + self.alteration_names[self.alteration + 2]
global reference_note
s = chr ((self.notename + 2) % 7 + ord ('a'))
s = s + self.alteration_names[self.alteration + 2]
elif commas < 0:
s = s + "," * -commas
elif commas < 0:
s = s + "," * -commas
- if explicit_durations_p \
+ if and dump_dur (explicit_durations_p \
or Duration.compare (self.duration,
or Duration.compare (self.duration,
- reference_note.duration):
+ reference_note.duration)):
s = s + self.duration.dump ()
reference_note = self
s = s + self.duration.dump ()
reference_note = self
s = s + dump (notes[0])
elif len (notes) > 1:
global reference_note
s = s + dump (notes[0])
elif len (notes) > 1:
global reference_note
- s = s + '<'
- s = s + notes[0].dump ()
+ s = s + '<<'
+ s = s + notes[0].dump (dump_dur = 0)
r = reference_note
for i in notes[1:]:
r = reference_note
for i in notes[1:]:
- s = s + i.dump ()
- s = s + '>'
+ s = s + i.dump (dump_dur = 0 )
+ s = s + '>>'
+
+ s = s + notes[0].duration.dump()
reference_note = r
return s
reference_note = r
return s
e= self.end_chord
if e and s:
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")
else:
sys.stderr.write ("\nOrphaned slur")
for p in self.pitches:
if str:
str = str + ' '
for p in self.pitches:
if str:
str = str + ' '
- str = str + pitch_to_lily_string (p) + sd
+ str = str + pitch_to_lily_string (p)
- for s in self.scripts:
- str = str + '-' + s
str = self.note_prefix +str + self.note_suffix
if len (self.pitches) > 1:
str = self.note_prefix +str + self.note_suffix
if len (self.pitches) > 1:
elif len (self.pitches) == 0:
elif len (self.pitches) == 0:
+ str = 'r'
+
+ str = str + sd
+ for s in self.scripts:
+ str = str + '-' + s
str = self.chord_prefix + str + self.chord_suffix
str = self.chord_prefix + str + self.chord_suffix
sd = sd + '.' * self.dots
sd = sd + '.' * self.dots
- str = ')' * len (self.slurstart) + str
-
for p in self.pitches:
if str:
str = str + ' '
for p in self.pitches:
if str:
str = str + ' '
- str = str + pitch_to_lily_string (p) + sd
- str = str + '(' * len (self.slurstart)
+ str = str + pitch_to_lily_string (p)
+ if len (self.pitches) > 1:
+ str = '<<%s>>' % str
+ elif len (self.pitches) == 0:
+ str = 'r'
+ str = str + sd + '-(' * len (self.slurstart) + '-)' * len (self.slurstart)
for s in self.scripts:
str = str + '-' + s
str = self.note_prefix +str + self.note_suffix
for s in self.scripts:
str = str + '-' + s
str = self.note_prefix +str + self.note_suffix
-
- if len (self.pitches) > 1:
- str = '<%s>' % str
- elif len (self.pitches) == 0:
- str = 'r' + sd
-
str = self.chord_prefix + str + self.chord_suffix
str = self.chord_prefix + str + self.chord_suffix
return str
class Measure_start:
return str
class Measure_start:
e= self.end_chord
if e and s:
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")
else:
sys.stderr.write ("\nOrphaned slur")
class Voice:
def __init__ (self):
self.entries = []
class Voice:
def __init__ (self):
self.entries = []
for p in self.pitches:
if str:
str = str + ' '
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:
if len (self.pitches) > 1:
elif len (self.pitches) == 0:
elif len (self.pitches) == 0:
+ 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
str = self.chord_prefix + str + self.chord_suffix
return str