@item
Octave checks make octave errors easier to correct.
The syntax is
+
@example
\octave @var{pitch}
@end example
@example
c8[( d8])
@end example
+
+@noindent
is a pair of beamed slurred eighth notes.
@item
The definition of @code{\relative} has been simplified. Octaves are
now always propagated in the order that music is entered. In the
following example,
+
@example
PRE
- \repeat "unfold" 3 BODY \alternative { ALT1 ALT2 ALT3 }
+ \repeat "unfold" 3 BODY \alternative @{ ALT1 ALT2 ALT3 @}
POST
@end example
+
+@noindent
the octave of BODY is based on PRE, the starting octave of ALT1 on
BODY, the starting octave of ALT2 on ALT1, etc.
+
The same mechanism is used for all other music expressions, except the
-chord. Backwards compatibility is retained through a special option,
-which is invoked as
+chord. Backwards compatibility is retained through a special program option,
+which is set through
@example
#(ly:set-option 'old-relative)
@end example
+@end itemize
+
while last_str <> str:
last_str = str
def sub_dyn_end (m):
- dyns.append (' -\!')
+ dyns.append (' \!')
return ' ' + m.group(2)
str = re.sub (r'(\\!)\s*([a-z]+)', sub_dyn_end, str)
def sub_slurs(m):
if '-)' not in slur_strs:
- slur_strs.append ( '-)')
+ slur_strs.append ( ')')
return m.group(1)
def sub_p_slurs(m):
if '-\)' not in slur_strs:
- slur_strs.append ( '-\)')
+ slur_strs.append ( '\)')
return m.group(1)
str = re.sub (r"\)[ ]*([a-z]+)", sub_slurs, str)
str = re.sub (r"\\\)[ ]*([a-z]+)", sub_p_slurs, str)
def sub_begin_slurs(m):
if '-(' not in slur_strs:
- slur_strs.append ( '-(')
+ slur_strs.append ( '(')
return m.group(1)
str = re.sub (r"([a-z]+[,'!?0-9 ]*)\(", sub_begin_slurs, str)
def sub_begin_p_slurs(m):
if '-\(' not in slur_strs:
- slur_strs.append ( '-\(')
+ slur_strs.append ( '\(')
return m.group(1)
str = re.sub (r"([a-z]+[,'!?0-9 ]*)\\\(", sub_begin_p_slurs, str)
def sub_dyns (m):
s = m.group(0)
if s == '@STARTCRESC@':
- slur_strs.append ("-\\<")
+ slur_strs.append ("\\<")
elif s == '@STARTDECRESC@':
- slur_strs.append ("-\\>")
+ slur_strs.append ("\\>")
elif s == r'-?\\!':
- slur_strs.append ('-\\!')
+ slur_strs.append ('\\!')
return ''
str = re.sub (r'@STARTCRESC@', sub_dyns, str)
str = re.sub (r"([_^-][>_.+|^-])", sub_articulations, str)
def sub_pslurs(m):
- slur_strs.append ( ' -\\)')
+ slur_strs.append ( ' \\)')
return m.group(1)
str = re.sub (r"\\\)[ ]*([a-z]+)", sub_pslurs, str)
simstart = "<"
chordstart = '<<'
chordend = '>>'
+ marker_str = '%% new-chords-done %%'
if re.search (marker_str,str):
return str
str= re.sub (r'([_^-])>', r'\1@ACCENT@', str)
str = re.sub ('<([^<>{}]+)>', sub_chord, str)
- str = re.sub (r'\[ *(@STARTCHORD@[^@]+@ENDCHORD@[0-9.]+)',
- r'\1-[',
+ str = re.sub (r'\[ *(@STARTCHORD@[^@]+@ENDCHORD@[0-9.]*)',
+ r'\1[',
str)
- str = re.sub (r'\\! *(@STARTCHORD@[^@]+@ENDCHORD@[0-9.]+)',
- r'\1-\\!',
+ str = re.sub (r'\\! *(@STARTCHORD@[^@]+@ENDCHORD@[0-9.]*)',
+ r'\1\\!',
str)
str = re.sub ('<([^?])', r'%s\1' % simstart, str)
str = re.sub ('>([^?])', r'%s\1' % simend, str)
def articulation_substitute (str):
str = re.sub (r"""([^-])\[ *([a-z]+[,']*[!?]?[0-9:]*\.*)""",
- r" \1 \2-[", str)
+ r" \1 \2[", str)
str = re.sub (r"""([^-])\) *([a-z]+[,']*[!?]?[0-9:]*\.*)""",
- r"\1 \2-)", str)
+ r"\1 \2)", str)
str = re.sub (r"""([^-])\\! *([a-z]+[,']*[!?]?[0-9:]*\.*)""",
- r"\1 \2-\\!", str)
+ r"\1 \2\\!", str)
return str
def conv_relative(str):
def conv (str):
str = conv_relative (str)
- if re.search (marker_str, str) == None :
- str = sub_chords (str)
+ str = sub_chords (str)
str = articulation_substitute (str)
return str
conversions.append (((1,9,0), conv, """New relative mode,
-Postfix articulations, new chord syntax."))
+Postfix articulations, new chord syntax."""))
################################
# END OF CONVERSIONS
else:
sys.stderr.write ("%s: skipping: `%s' " % (program_name, f))
pass
+
sys.stderr.write ('\n')