lilypond-devel
[Top][All Lists]
Advanced

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

Issue 4211: Add an alternative quarter rest shaped like a mirrored Z. (i


From: nine . fierce . ballads
Subject: Issue 4211: Add an alternative quarter rest shaped like a mirrored Z. (issue 177640043 by address@hidden)
Date: Tue, 02 Dec 2014 00:41:57 +0000

Reviewers: ,

Message:
I revised the glyph again after I saw how it looked with a dot next to
it.  The version in this patch is somewhere between the first and second
drafts that were posted to the devel list.

Please pay close attention to the metafont code.  I only understand half
of it.  Thanks.

Description:
For example, see G. Ricordi's edition of Don Pasquale by G. Donizetti,
Atto Primo, Introduzione, measure 4, bass staff:
http://javanese.imslp.info/files/imglnks/usimg/1/1a/IMSLP141736-PMLP58429-Donizetti_-_Don_Pasquale_VS_Sibley.1802.16329.pdf
Many other quarter rests in the same score look slightly different.

This new rest is designed to fit in with the other rests in the Feta
font rather than to reproduce a particular historical look exactly.

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

Affected files (+86, -4 lines):
  M input/regression/rest-dot-position.ly
  M input/regression/rest-note-collision.ly
  M mf/feta-rests.mf


Index: input/regression/rest-dot-position.ly
diff --git a/input/regression/rest-dot-position.ly b/input/regression/rest-dot-position.ly index 2aef41e8e3a983c1a0c698944d085a5aa85fc5f8..fc18e4a5d9c11b8c2960df5cdee855b0560b21c3 100644
--- a/input/regression/rest-dot-position.ly
+++ b/input/regression/rest-dot-position.ly
@@ -6,19 +6,30 @@

 \version "2.16.0"

+\layout { indent = 0 }
 \paper { ragged-right = ##t }

 {
     \set Score.timing = ##f
+    \set Score.initialTimeSignatureVisibility = #(vector #f #f #f)
     r\longa. r\breve.
-    r1. r2. r4. r8. r16. r32. r64. r64.
+    r1. r2. r4.
+    \once \override Rest #'style = #'classical r4.
+    \once \override Rest #'style = #'z r4.
+    r8. r16. r32. r64. r64.
     \bar ""
     << {
        r\longa. r\breve.
-       r1. r2. r4. r8. r16. r32. r64. r64.
+       r1. r2. r4.
+        \once \override Rest #'style = #'classical r4.
+        \once \override Rest #'style = #'z r4.
+       r8. r16. r32. r64. r64.
     } \\ {
        r\longa. r\breve.
-       r1. r2. r4. r8. r16. r32. r64. r64.
+       r1. r2. r4.
+        \once \override Rest #'style = #'classical r4.
+        \once \override Rest #'style = #'z r4.
+       r8. r16. r32. r64. r64.
     } >>

 }
Index: input/regression/rest-note-collision.ly
diff --git a/input/regression/rest-note-collision.ly b/input/regression/rest-note-collision.ly index 2a448aa75b10c1b00df2c905d45ad42caaafa3b9..cd69298105345b06977597c88e8f654df653526b 100644
--- a/input/regression/rest-note-collision.ly
+++ b/input/regression/rest-note-collision.ly
@@ -8,8 +8,8 @@


 \version "2.16.0"
-\new Staff {

+music = {
   <<
     \relative c'' {
       f e d c b a g f e d c
@@ -29,3 +29,15 @@
     }
   >>
 }
+
+\score {
+  \new Staff { \music }
+}
+
+\score {
+  \new Staff { \override Staff.Rest #'style = #'z \music }
+}
+
+\score {
+  \new Staff { \override Staff.Rest #'style = #'classical \music }
+}
Index: mf/feta-rests.mf
diff --git a/mf/feta-rests.mf b/mf/feta-rests.mf
index 0a9d7ea43d9234e1da701dcf473103a39608e731..a3030aa599a0410ad6552e7a64fc58603ee28a91 100644
--- a/mf/feta-rests.mf
+++ b/mf/feta-rests.mf
@@ -378,6 +378,65 @@ fet_beginchar ("Classical quarter rest", "2classical");
 fet_endchar;


+fet_beginchar ("Z-shaped quarter rest", "2z");
+       save ycenter;
+       save pat, bulb, rest;
+       path pat, bulb, rest;
+
+       set_char_box (0, 1.125 staff_space#,
+                     0.5 staff_space# + bulb_diam# / 2,
+                     0.5 staff_space# + bulb_diam# / 2);
+
+       % The brushes on other rests taper from thin to thick,
+       % but because this rest has a bulb on both ends, use
+       % a constant thickness somewhere in between.
+       slash_thickness := (7 thin + 3 thick) / 10;
+
+       x1 = 0 + hround 0.5 slash_thickness;
+       y1 = -(d - vround 0.5 slash_thickness);
+       x2 = w - hround 0.5 slash_thickness;
+       y2 = h - vround 0.5 slash_thickness;
+
+       penpos1 (slash_thickness, angle(z2 - z1) - 90);
+       penpos2 (slash_thickness, angle(z2 - z1) - 90);
+
+       z9 = z2 + 0.5 slash_thickness * dir (angle (z2 - z1));
+       z12 = z1 + 0.5 slash_thickness * dir (angle (z1 - z2));
+       y9 := vround y9;
+
+       x1l := hround x1l;
+       x1r := hround x1r;
+       x1 := .5 [x1l, x1r];
+
+       x2l := hround x2l;
+       x2r := hround x2r;
+       x2 := .5 [x2l, x2r];
+
+       penlabels (1, 2);
+       labels (9, 12);
+
+       pat = z1l
+             -- z2l
+             .. z9
+             .. z2r
+             -- z1r
+             .. cycle;
+       bulb = draw_rest_bulb (0.5 staff_space, y2r, pat, 1.0, 1);
+
+       rest = z12
+              .. bulb rotatedaround ((0.5 w, 0), 180)
+              -- z2r
+              .. z9
+              .. bulb
+              -- z1l
+              .. cycle;
+
+       fill rest xscaled -1 shifted (w, 0);
+
+       draw_staff_if_debugging (-2, 2);
+fet_endchar;
+
+
 fet_beginchar ("8th rest", "3");
        draw_eighth_rest (1);
 fet_endchar;





reply via email to

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