]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4211: Add an alternative quarter rest shaped like a mirrored Z.
authorDan Eble <nine.fierce.ballads@gmail.com>
Sat, 29 Nov 2014 14:06:55 +0000 (09:06 -0500)
committerDan Eble <nine.fierce.ballads@gmail.com>
Tue, 9 Dec 2014 00:32:50 +0000 (19:32 -0500)
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.

input/regression/rest-dot-position.ly
input/regression/rest-note-collision.ly
mf/feta-rests.mf

index 2aef41e8e3a983c1a0c698944d085a5aa85fc5f8..fc18e4a5d9c11b8c2960df5cdee855b0560b21c3 100644 (file)
@@ -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 2a448aa75b10c1b00df2c905d45ad42caaafa3b9..cd69298105345b06977597c88e8f654df653526b 100644 (file)
@@ -8,8 +8,8 @@
 
 
 \version "2.16.0"
-\new Staff {
 
+music = {
   <<
     \relative c'' {
       f e d c b a g f e d c
     }
   >>
 }
+
+\score {
+  \new Staff { \music }
+}
+
+\score {
+  \new Staff { \override Staff.Rest #'style = #'z \music }
+}
+
+\score {
+  \new Staff { \override Staff.Rest #'style = #'classical \music }
+}
index 0a9d7ea43d9234e1da701dcf473103a39608e731..c531a70e89805ecb4c8f9c49fd806382e7fa9893 100644 (file)
@@ -378,6 +378,72 @@ 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;
+       show_labels := 0;
+
+       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];
+
+       if show_labels = 1:
+               penlabels (1, 2);
+               labels (9, 12);
+       fi;
+
+       pat = z1l
+             -- z2l
+             .. z9
+             .. z2r
+             -- z1r
+             .. cycle;
+       bulb = draw_rest_bulb (0.5 staff_space, y2r, pat, 1.0, show_labels);
+
+       rest = z12
+              .. bulb rotatedaround ((0.5 w, 0), 180)
+              -- z2r
+              .. z9
+              .. bulb
+              -- z1l
+              .. cycle;
+
+       if show_labels = 0:
+               rest := rest xscaled -1 shifted (w, 0);
+       fi;
+
+       fill rest;
+
+       draw_staff_if_debugging (-2, 2);
+fet_endchar;
+
+
 fet_beginchar ("8th rest", "3");
        draw_eighth_rest (1);
 fet_endchar;