lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: add fermata markup commands (issue 344160043 by address@hidden)


From: lilypond
Subject: Re: add fermata markup commands (issue 344160043 by address@hidden)
Date: Thu, 28 Feb 2019 01:21:34 -0800

Reviewers: lemzwerg,

Message:
On 2019/02/28 09:15:44, lemzwerg wrote:
LGTM.  However, I'm not completely happy with it.  What about making
\fermata
(and \fermataMarkup) accept an optional argument that indicates the
type:

   \fermata 'short
   \fermata 'veryLong

I’m not sure whether that would be an improvement; I used the same names
as for the scripts as it is done with \fermata[Markup]:

% currently possible
\markup \fermata
{ b1-\fermata R\fermataMarkup }

% after this patch
\markup \verylongfermata
{ b1-\verlylongfermata R\verylongfermataMarkup }

\fermata 'verylong isn’t easier to type or to remember than
\verylongfermata IMHO.

   \fermata "arbitrary markup stuff"

We definitely don’t need that. If you want a script, just use the
correct command like -. or \staccato or a TextScript. If you want a
markup, just write \markup "foo" instead of \markup \fermata "foo". If
you want to center something above a MultiMeasureRest, just use {
R1-"foo" } instead of { R1-\fermataMarkup "foo" }.

Description:
add fermata markup commands

Like the markup command \fermata and \fermataMarkup there are now:
\shortfermata, \longfermata, \verylongfermata
\shortfermataMarkup, \longfermataMarkup, \verylongfermataMarkup

contains also: add fermata markup commands to docs

Please review this at https://codereview.appspot.com/344160043/

Affected files (+76, -2 lines):
  M Documentation/changes.tely
  M Documentation/notation/expressive.itely
  M ly/property-init.ly
  M scm/define-markup-commands.scm


Index: Documentation/changes.tely
diff --git a/Documentation/changes.tely b/Documentation/changes.tely
index d851415574e7d1e815d943fdfee466c47bc6f5f8..20b899916e1a65ccdb17979c3038abf8bd796569 100644
--- a/Documentation/changes.tely
+++ b/Documentation/changes.tely
@@ -62,6 +62,21 @@ which scares away people.
 @end ignore


address@hidden
+Markup commands for short, long, and very long fermatas have been added as well as matching commands for multi-measure rests:
address@hidden,quote]
+\markup {
+  "Short and long fermata:"
+  \shortfermata
+  \override #`(direction . ,DOWN)
+  \longfermata
+}
+
+{
+  R1\verylongfermataMarkup
+}
address@hidden lilypond
+
 @item
 Chords may now be automatically inverted or voiced with dropped notes.
 @lilypond[verbatim,quote]
Index: Documentation/notation/expressive.itely
diff --git a/Documentation/notation/expressive.itely b/Documentation/notation/expressive.itely index 992fa7f4d6e04866b1e2dea1e33519aec78c08a7..a6d3c10ab33c718634ab5204ca578d3f348f1033 100644
--- a/Documentation/notation/expressive.itely
+++ b/Documentation/notation/expressive.itely
@@ -112,7 +112,10 @@ Methods to create new dynamic markings are also discussed.
 @funindex \fermata
 @funindex \longfermata
 @funindex \verylongfermata
address@hidden \shortfermataMarkup
 @funindex \fermataMarkup
address@hidden \longfermataMarkup
address@hidden \verylongfermataMarkup
 @funindex \segno
 @funindex \coda
 @funindex \varcoda
@@ -169,8 +172,10 @@ Articulations are @code{Script} objects. Their properties are
 described more fully in @rinternals{Script}.

 Articulations can be attached to rests as well as notes but they
-cannot be attached to multi-measure rests.  A special predefined
-command, @code{\fermataMarkup}, is available for attaching a fermata
+cannot be attached to multi-measure rests.  Special predefined
+commands, @code{\fermataMarkup}, @code{\shortfermataMarkup},
address@hidden, and @code{\verylongfermataMarkup},
+are available for attaching fermatas of different lengths
 to a multi-measure rest (and only a multi-measure rest).  This
 creates a @code{MultiMeasureRestText} object.

Index: ly/property-init.ly
diff --git a/ly/property-init.ly b/ly/property-init.ly
index e3ae2147be607304a7d3c4496b25f49b69ff0f88..91d03b25e9ce58dcc4fd56f7d9343d288b9421bb 100644
--- a/ly/property-init.ly
+++ b/ly/property-init.ly
@@ -216,6 +216,24 @@ fermataMarkup =
              'tweaks '((outside-staff-priority . 40)
                        (outside-staff-padding . 0)))

+shortfermataMarkup =
+#(make-music 'MultiMeasureTextEvent
+             'text (make-shortfermata-markup)
+             'tweaks '((outside-staff-priority . 40)
+                       (outside-staff-padding . 0)))
+
+longfermataMarkup =
+#(make-music 'MultiMeasureTextEvent
+             'text (make-longfermata-markup)
+             'tweaks '((outside-staff-priority . 40)
+                       (outside-staff-padding . 0)))
+
+verylongfermataMarkup =
+#(make-music 'MultiMeasureTextEvent
+             'text (make-verylongfermata-markup)
+             'tweaks '((outside-staff-priority . 40)
+                       (outside-staff-padding . 0)))
+
 %% font sizes

 teeny      = \set fontSize = #-3
Index: scm/define-markup-commands.scm
diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm
index 1c4fa2ab1b1eff16e6770443eb9e7aa33aa64279..e30dc6e43176c1fe851917875410cc1036279fbd 100644
--- a/scm/define-markup-commands.scm
+++ b/scm/define-markup-commands.scm
@@ -4178,6 +4178,42 @@ an inverted glyph. Note that within music, one would usually use the
                         (markup #:musicglyph "scripts.dfermata")
                         (markup #:musicglyph "scripts.ufermata"))))

+(define-markup-command (shortfermata layout props) ()
+  #:category music
+  #:properties ((direction UP))
+  "Create a shortfermata glyph.  When @var{direction} is @code{DOWN}, use
+an inverted glyph.  Note that within music, one would usually use the
address@hidden articulation instead of a markup.
+"
+  (interpret-markup layout props
+                    (if (eqv? direction DOWN)
+                        (markup #:musicglyph "scripts.dshortfermata")
+                        (markup #:musicglyph "scripts.ushortfermata"))))
+
+(define-markup-command (longfermata layout props) ()
+  #:category music
+  #:properties ((direction UP))
+  "Create a longfermata glyph.  When @var{direction} is @code{DOWN}, use
+an inverted glyph.  Note that within music, one would usually use the
address@hidden articulation instead of a markup.
+"
+  (interpret-markup layout props
+                    (if (eqv? direction DOWN)
+                        (markup #:musicglyph "scripts.dlongfermata")
+                        (markup #:musicglyph "scripts.ulongfermata"))))
+
+(define-markup-command (verylongfermata layout props) ()
+  #:category music
+  #:properties ((direction UP))
+ "Create a verylongfermata glyph. When @var{direction} is @code{DOWN}, use
+an inverted glyph.  Note that within music, one would usually use the
address@hidden articulation instead of a markup.
+"
+  (interpret-markup layout props
+                    (if (eqv? direction DOWN)
+                        (markup #:musicglyph "scripts.dverylongfermata")
+                        (markup #:musicglyph "scripts.uverylongfermata"))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; translating.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]