-1.3.99.jcn1
+--- ../lilypond-1.3.99/CHANGES Wed Oct 25 07:03:07 2000
+++ b/CHANGES Fri Oct 27 20:28:15 2000
+@@ -1,3 +1,25 @@
+1.3.99.lec1
+===========
+* fixes to abc2ly:
+
+ puts text above rather than below the staff.
+
+ interprets %%MIDI nobarlines (this is an esoteric change, but
+ I need it to use the program at all -- it assumes that
+ accidentals are not persistent.
+
+ Interprets the -8va tenor g clef.
+
+ Fix to previously claimed fix for setting L: before M:
+
+ Uses current rather than deprecated syntax for \property
+ Staff.TimeSignature
+
+ Allows a space between key letter and mode.
+
+ Fix to translation table for :|:
+
+
+ 1.3.98.jcn2
+ ===========
+ 1.3.99.jcn1
===========
* Made several font size and initialisation fixes.
# Enhancements (Laura Conrad)
#
-# Beaming now preserved between ABC and lilypond
-#
+# Barring now preserved between ABC and lilypond
+# the default placement for text in abc is above the staff.
+
# Limitations
#
# Multiple tunes in single file not supported
part_names = 0
default_len = 8
length_specified = 0
+nobarlines = 0
global_key = [0] * 7 # UGH
names = ["One", "Two", "Three"]
DIGITS='0123456789'
else:
state.base_octave = 0
voices_append("\\clef treble;\n")
+ elif re.match('^-8va', s):
+ s = s[4:]
+ state.base_octave = -1
+ voices_append("\\clef \"G_8\";\n")
elif re.match('^alto', s):
s = s[4:]
state.base_octave = -1
def set_default_length (s):
+ global length_specified
m = re.search ('1/([0-9]+)', s)
if m:
__main__.default_len = string.atoi ( m.group (1))
def try_parse_header_line (ln, state):
+ global length_specified
m = re.match ('^([A-Za-z]): *(.*)$', ln)
if m:
if a == 'C':
if not state.common_time:
state.common_time = 1
- voices_append ("\\property Staff.timeSignatureStyle=\"C\"\n")
+# voices_append ("\\property Staff.timeSignatureStyle=\"C\"\n")
+ voices_append ("\\property Staff.TimeSignature \push #\'style = #\"C\"\n")
a = '4/4'
if a == 'C|':
if not state.common_time:
state.common_time = 1
- voices_append ("\\property Staff.timeSignatureStyle=\"C\"\n")
+ voices_append ("\\property Staff.TimeSignature \push #\'style = #\"C\"\n")
a = '2/2'
if not length_specified:
set_default_len_from_time_sig (a)
+ else:
+ length_specified = 0
voices_append ('\\time %s;' % a)
state.next_bar = ''
if g == 'K': # KEY
if a:
m = re.match ('^([^ \t]*) *(.*)$', a) # seperate clef info
if m:
- __main__.global_key =compute_key (m.group(1))# ugh.
- voices_append ('\\key %s;' % lily_key(m.group(1)))
- check_clef(m.group(2))
+ # there may or may not be a space
+ # between the key letter and the mode
+ if key_lookup.has_key(m.group(2)[0:3]):
+ key_info = m.group(1) + m.group(2)[0:3]
+ clef_info = m.group(2)[4:]
+ else:
+ key_info = m.group(1)
+ clef_info = m.group(2)
+ __main__.global_key = compute_key (key_info)# ugh.
+ voices_append ('\\key %s;' % lily_key(key_info))
+ check_clef(clef_info)
else:
- __main__.global_key =compute_key (a)# ugh.
+ __main__.global_key = compute_key (a)# ugh.
voices_append ('\\key %s \\major;' % lily_key(a))
if g == 'O': # Origin
header ['origin'] = a
def pitch_to_mudela_name (name, acc, bar_acc, key):
s = ''
if acc == UNDEF:
- acc = bar_acc
+ if not nobarlines:
+ acc = bar_acc
if acc == UNDEF:
acc = key
if acc == -1:
if str:
str = str[1:]
gc = re.sub('#', '\\#', gc) # escape '#'s
- state.next_articulation = ("-\"%s\"" % gc) + state.next_articulation
+ state.next_articulation = ("^\"%s\"" % gc) + state.next_articulation
return str
def try_parse_escape (str):
'[|' : '||',
':|' : ':|',
'|:' : '|:',
-'::' : '::',
+'::' : ':|:',
'|1' : '|',
'|2' : '|',
':|2' : ':|',
return str
+def try_parse_comment (str):
+ global nobarlines
+ #debugging
+# sys.stderr.write("str: %s \n" % str)
+
+ # for now, just do %%MIDI nobarlines
+ if (str[0] == '%'):
+ #debugging
+# sys.stderr.write("we have %%\n")
+ if str[0:5] == '%MIDI':
+ #debugging
+# sys.stderr.write ("we have %%MIDI\n")
+ if (string.find(str,'nobarlines') > 0):
+ #debugging
+# sys.stderr.write ("we have nobarlines\n")
+ nobarlines = 1
+ return str
happy_count = 100
def parse_file (fn):
m = re.match ('^([^%]*)%(.*)$',ln) # add comments to current voice
if m:
if m.group(2):
+ try_parse_comment(m.group(2))
voices_append ('%% %s\n' % m.group(2))
ln = m.group (1)