From: Laura Conrad Date: Fri, 27 Oct 2000 18:28:15 +0000 (+0200) Subject: patch::: 1.3.99.lec1 X-Git-Tag: release/1.3.100~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b97b3080fd5499cacf1f3823c9268208f1d7df9c;p=lilypond.git patch::: 1.3.99.lec1 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 :|: --- Generated by (address unknown), From = lilypond-1.3.99, To = lilypond-1.3.99.lec1 usage cd lilypond-source-dir; patch -E -p1 < lilypond-1.3.99.lec1.diff Patches do not contain automatically generated files or (urg) empty directories, i.e., you should rerun autoconf, configure --- diff --git a/CHANGES b/CHANGES index 4392a298dd..835d1196ca 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,31 @@ -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. diff --git a/VERSION b/VERSION index 3303cdd964..1616b490ab 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=99 -MY_PATCH_LEVEL=jcn1 +MY_PATCH_LEVEL=lec1 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/scripts/abc2ly.py b/scripts/abc2ly.py index dc08ba9395..8a9b50fb9f 100644 --- a/scripts/abc2ly.py +++ b/scripts/abc2ly.py @@ -28,8 +28,9 @@ # 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 @@ -75,6 +76,7 @@ lyric_idx = -1 part_names = 0 default_len = 8 length_specified = 0 +nobarlines = 0 global_key = [0] * 7 # UGH names = ["One", "Two", "Three"] DIGITS='0123456789' @@ -93,6 +95,10 @@ def check_clef(s): 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 @@ -207,6 +213,7 @@ def dump_score (outf): 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)) @@ -489,6 +496,7 @@ def slyrics_append(a): def try_parse_header_line (ln, state): + global length_specified m = re.match ('^([A-Za-z]): *(.*)$', ln) if m: @@ -505,15 +513,18 @@ def try_parse_header_line (ln, state): 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 @@ -521,11 +532,19 @@ def try_parse_header_line (ln, state): 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 @@ -567,7 +586,8 @@ def try_parse_header_line (ln, state): 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: @@ -866,7 +886,7 @@ def try_parse_guitar_chord (str, state): 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): @@ -893,7 +913,7 @@ bar_dict = { '[|' : '||', ':|' : ':|', '|:' : '|:', -'::' : '::', +'::' : ':|:', '|1' : '|', '|2' : '|', ':|2' : ':|', @@ -997,6 +1017,23 @@ def try_parse_grace_delims (str, state): 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): @@ -1018,6 +1055,7 @@ 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)