]> git.donarmstrong.com Git - lilypond.git/commitdiff
Make tempo range \tempo 20~30 be input as \tempo 20-30 instead
authorDavid Kastrup <dak@gnu.org>
Sun, 4 Aug 2013 09:36:34 +0000 (11:36 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 13 Aug 2013 11:57:23 +0000 (13:57 +0200)
\tempo's use of ~ was rather untypical for LilyPond.  Letting it
rather use @code{-} for ranges leaves just a single use for ties,
making it feasible to make @code{~} definable by the user in a later
commit.

Documentation/changes.tely
lily/parser.yy
python/convertrules.py
scm/define-music-display-methods.scm

index 419dad0e81ca638476c8d33abbe33f3b35e46fa5..c2ada64c4b55e6a55162c73c0071c5cf02d6bd63 100644 (file)
@@ -61,6 +61,10 @@ which scares away people.
 
 @end ignore
 
+@item
+Tempo change ranges are now written as @code{\tempo 4 = 60 - 68}
+rather than @code{\tempo 4 = 60 ~ 68}.
+
 @item
 Grob @code{OctavateEight} was renamed to @code{ClefModifier}.
 Related context properties were renamed from @code{xxxOctavationyyy}
index a7d7285a06747382f3765f4c4c479150a82fd8cb..3a64654197fd7ac4ba0fb86463a33dedcec5443c 100644 (file)
@@ -3188,7 +3188,7 @@ tempo_range:
        UNSIGNED {
                $$ = $1;
        }
-       | UNSIGNED '~' UNSIGNED {
+       | UNSIGNED '-' UNSIGNED {
                $$ = scm_cons ($1, $3);
        }
        ;
index 121b12182cadfad528e7e31903a2cd17b5dfa7a8..6f0a0f1a04771beeca1c7fcc60b3ba6cb7ad0ebe 100644 (file)
@@ -3591,6 +3591,16 @@ def conv(str):
                   r"\1", str)
     return str
 
+@rule((2, 17, 25), r'''\tempo 4. = 50~60 -> \tempo 4. = 50-60''')
+def conv(str):
+#  This goes for \tempo commands ending with a range, like
+#  = 50 ~ 60
+#  and uses - instead.  We don't explicitly look for \tempo since the
+#  complete syntax has a large number of variants, and this is quite
+#  unlikely to occur in other contexts
+    str = re.sub (r"(=\s*[0-9]+\s*)~(\s*[0-9]+\s)", r"\1-\2", str)
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,
index 537e5d24dfbfb6c0a599433fbae8ef9fd22130b9..ccbeee6ad6275223aa13b6b9a52a604dfa59f103 100644 (file)
@@ -917,7 +917,7 @@ Otherwise, return #f."
                                 '())
                             (duration->lily-string ?unit #:force-duration #t)
                             (if (pair? ?count)
-                                (format #f "~a ~~ ~a" (car ?count) (cdr ?count))
+                                (format #f "~a - ~a" (car ?count) (cdr ?count))
                                 ?count)
                             (new-line->lily-string))))