lilypond-devel
[Top][All Lists]
Advanced

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

Re: Caesura, n-th time :)


From: Maximilian Albert
Subject: Re: Caesura, n-th time :)
Date: Mon, 01 Oct 2007 19:30:14 +0200
User-agent: Mozilla-Thunderbird 2.0.0.4 (X11/20070828)

Han-Wen Nienhuys schrieb:

Hi,

can you send a patch which adds it as a new glyph (caesura.straight)
and leaves the old one as caesura.curved, and adjusts the .ly init
files appropriately? Also, if possible, a more verbose commit message
would be nice.

Sure! Corresponding patch is attached. Sorry for replacing the old glyph in the first place (see my reply to Werner's email for an explanation).

However, I don't know what needs to be adjusted in the .ly init files. The only reference to a "caesura" I could find was in gregorian-init.ly, but the definition there uses the glyph 'scripts.rvarcomma', not 'scripts.caesura', so there's no need for adaption. Or am I missing anything?

On the other hand, I believe at least one of the files

  input/regression/breathing-sign.ly
  input/lsr/expressive/breathing-sign.ly

should be updated. I'm not 100% sure, though, since the version number at the top of input/regression/breathing-sign.ly reads "2.10.0", and the second file has a remark saying that it should not be edited because it is updated automatically from LSR.

In any case, I'm attaching a second patch to update the regression test file if necessary. Please tell me if I should do anything else to update the LSR one, too.

Thanks,
Max
>From 2b7b439319336906ef83a74614ebbdb8720a2338 Mon Sep 17 00:00:00 2001
From: Maximilian Albert <address@hidden>
Date: Mon, 1 Oct 2007 18:39:32 +0200
Subject: [PATCH] Add a new caesura glyph (two straight parallel slashes) as 
caesura.straight; rename the existing one to caesura.curved

---
 mf/feta-schrift.mf |   62 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/mf/feta-schrift.mf b/mf/feta-schrift.mf
index 10eebb5..d801237 100644
--- a/mf/feta-schrift.mf
+++ b/mf/feta-schrift.mf
@@ -1445,13 +1445,12 @@ fet_endchar;
 input feta-slag;
 
 
-% railroad tracks.
 %
-% I actually have no clue how they should look, so we use a slightly curvy
-% and tapered shape.
+% Railroad tracks. We define two variants of these - both as slightly
+% tapered, comma-shaped curves and as two straight parallel slashes.
 %
 
-fet_beginchar ("Caesura", "caesura");
+fet_beginchar ("Curved caesura", "caesura.curved");
        save slant, space_between, clearance;
        save alpha, pat;
        save botthick, topthick;
@@ -1504,5 +1503,60 @@ fet_beginchar ("Caesura", "caesura");
        fill pat shifted (space_between, 0);
 fet_endchar;
 
+fet_beginchar ("Straight caesura", "caesura.straight");
+       save slant, space_between, clearance, height;
+       save thick, upslant, center, factor, pat;
+       path pat;
+       pair upslant, center;
+
+       slant = 2.0;
+       thick = 2.88 linethickness;
+
+       space_between# = 0.56 staff_space#;
+       clearance# = 0.2 staff_space#;
+
+       set_char_box (0, 2.0 staff_space#,
+                     staff_space# - clearance#, 1.2 staff_space#);
+       define_whole_pixels (space_between);
+
+       height = h+d;
+
+       z1 = origin shifted (0,-d);
+       z2 = z1 shifted (thick,0);
+       z3 = z1 shifted (thick+height/slant,height);
+       z4 = z1 shifted (height/slant,height);
+
+       upslant = unitvector(z4-z1);
+       factor = 1.2 blot_diameter;
+       center = 0.5[z1,z3];
+       
+       z1a = z1 shifted (upslant*factor);
+       z1b = z1 shifted (right*factor);
+       z2a = z2 shifted (upslant*factor);
+       z2b = z2 shifted (left*factor);
+
+       z3a = z1a rotatedabout (center,180);
+       z3b = z1b rotatedabout (center,180);
+       z4a = z2a rotatedabout (center,180);
+       z4b = z2b rotatedabout (center,180);
+
+       z1c = 0.4[z1,0.6[z1a,z1b]];
+       z3c = z1c rotatedabout (center, 180);
+
+       z2c = 0.4[z2,0.5[z2a,z2b]];
+       z4c = z2c rotatedabout (center, 180);
+
+       pat = z1a{-upslant}...z1c...{right}z1b--
+             z2b{right}...z2c...{upslant}z2a--
+             z3a{upslant}...z3c...{left}z3b--
+             z4b{left}...z4c...{-upslant}z4a--cycle;
+
+       fill pat;
+       fill pat shifted (space_between, 0);
+
+       labels(range 1 thru 4);
+       labels(1a,1b,2a,2b,3a,3b,4a,4b);
+       labels(1c,2c,3c,4c);
+fet_endchar;
 
 fet_endgroup ("scripts");
-- 
1.5.3.1

>From 0639ae7f4ef4b03278ce2164f7dc59d56e1d6b12 Mon Sep 17 00:00:00 2001
From: Maximilian Albert <address@hidden>
Date: Mon, 1 Oct 2007 19:10:00 +0200
Subject: [PATCH] Update input/regression/breathing-sign.ly to account for the 
new caesura glyph

---
 input/regression/breathing-sign.ly |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/input/regression/breathing-sign.ly 
b/input/regression/breathing-sign.ly
index 9a0fa00..4a04f42 100644
--- a/input/regression/breathing-sign.ly
+++ b/input/regression/breathing-sign.ly
@@ -42,10 +42,13 @@ ticks, vees and `railroad tracks' (caesura)."
       #(make-musicglyph-markup "scripts.upbow")
       es8 d es f g8 \breathe f |
 
-      %% caesura
+      %% caesurae
       \override BreathingSign  #'text =
-      #(make-musicglyph-markup "scripts.caesura")
-      es8[ d] \breathe  es[ f g f] |
+      #(make-musicglyph-markup "scripts.caesura.curved")
+      es8[ d] \breathe
+      \override BreathingSign  #'text =
+      #(make-musicglyph-markup "scripts.caesura.straight")
+                       es[ f] \breathe g[ f] |
       es2 r4 \bar "||" \break
     }
   }
-- 
1.5.3.1


reply via email to

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