From a7c14a5a83ddf2926895aa40cfdf50e7dcebf53c Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sun, 4 Aug 2013 12:21:09 +0200 Subject: [PATCH] Replace staccatissimo shorthand -| with -! The bar line character is used too prominently, and ! seems more appropriate. --- Documentation/changes.tely | 4 ++++ lily/parser.yy | 4 ++-- python/convertrules.py | 11 ++++++++++- scm/define-music-display-methods.scm | 2 +- scripts/musicxml2ly.py | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Documentation/changes.tely b/Documentation/changes.tely index c2ada64c4b..f32e9fece8 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -61,6 +61,10 @@ which scares away people. @end ignore +@item +The articulation shorthand for @code{\staccatissimo} has been +renamed from @code{-|} to@tie{}@code{-!}. + @item Tempo change ranges are now written as @code{\tempo 4 = 60 - 68} rather than @code{\tempo 4 = 60 ~ 68}. diff --git a/lily/parser.yy b/lily/parser.yy index 3a64654197..ed9c90f907 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -2800,8 +2800,8 @@ script_abbreviation: | '-' { $$ = scm_from_locale_string ("Dash"); } - | '|' { - $$ = scm_from_locale_string ("Bar"); + | '!' { + $$ = scm_from_locale_string ("Bang"); } | ANGLE_CLOSE { $$ = scm_from_locale_string ("Larger"); diff --git a/python/convertrules.py b/python/convertrules.py index 6f0a0f1a04..e2acf4e266 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3591,7 +3591,8 @@ def conv(str): r"\1", str) return str -@rule((2, 17, 25), r'''\tempo 4. = 50~60 -> \tempo 4. = 50-60''') +@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 @@ -3599,6 +3600,14 @@ def conv(str): # 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) +# Match strings, and articulation shorthands that end in -^_ +# so that we leave alone -| in quoted strings and c4--| + def subnonstring(m): + if m.group (1): + return m.group (1)+"!" + return m.group (0) + str = re.sub (r"([-^_])\||" + matchstring + r"|[-^_][-^_]", subnonstring, str) + str = re.sub (r"\bdashBar\b", "dashBang", str) return str # Guidelines to write rules (please keep this at the end of this file) diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index ccbeee6ad6..bafa57200d 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -179,7 +179,7 @@ expression." ((marcato) "^") ((stopped) "+") ((tenuto) "-") - ((staccatissimo) "|") + ((staccatissimo) "!") ((accent) ">") ((staccato) ".") ((portato) "_") diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 8738b2a073..ec827b5d39 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -1167,7 +1167,7 @@ articulations_dict = { #"shake": "?", "snap-pizzicato": "snappizzicato", #"spiccato": "?", - "staccatissimo": (musicexp.ShortArticulationEvent, "|"), # or "staccatissimo" + "staccatissimo": (musicexp.ShortArticulationEvent, "!"), # or "staccatissimo" "staccato": (musicexp.ShortArticulationEvent, "."), # or "staccato" "stopped": (musicexp.ShortArticulationEvent, "+"), # or "stopped" #"stress": "?", -- 2.39.2