]> git.donarmstrong.com Git - lilypond.git/commitdiff
New short lyric tie.
authorBertrand Bordage <bordage.bertrand@gmail.com>
Mon, 15 Aug 2011 23:17:51 +0000 (01:17 +0200)
committerBertrand Bordage <bordage.bertrand@gmail.com>
Mon, 19 Sep 2011 07:29:07 +0000 (09:29 +0200)
This handles a special case met at least in Italian.
The default tie has also been redesigned.

Documentation/de/notation/vocal.itely
Documentation/es/notation/vocal.itely
Documentation/fr/notation/vocal.itely
Documentation/notation/vocal.itely
mf/feta-ties.mf
scm/define-markup-commands.scm

index 8315c4a2e0569483698b3c35bc297c8144e544c5..e7b594a56a8af197a3af420ae3cbeb0c0c4da7e6 100644 (file)
@@ -629,11 +629,11 @@ gesetzt werden.
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index f3af14dcb00efc374d1f1c38790858ebddc2e183..24da8faa278809d637cd9d40a025a183842de3fe 100644 (file)
@@ -644,11 +644,11 @@ texto.
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index 4aa8fab2783e8ea023a4f7671ff528cea5742d80..2b5b4351f7ba587ac24c2342858689b4138a39e1 100644 (file)
@@ -615,11 +615,11 @@ mettre entre guillemets, soit utiliser le caractère souligné
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index a04a8e6ede18177ca332210d899341beda7e2f80..70f7c929868bfc80aa99682372e402de31167879 100644 (file)
@@ -613,11 +613,11 @@ the tilde symbol (@code{~}) to get a lyric tie.
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index 4378d576d85b1b08c7d3629141eff4bf320ca3c0..fc0ccb14a4a47ff795e120039de4d4b8c037f893 100644 (file)
 
 fet_begingroup ("ties");
 
-fet_beginchar ("lyric tie", "lyric");
-       save padding;
+save min_width, max_width, min_height, max_height, thin, thick;
 
-       padding := .4 staff_space;
+min_width:= .5 staff_space#;
+max_width:= 5 staff_space#;
+min_height := .2 staff_space#;
+max_height := .4 staff_space#;
+thin := 1.2 linethickness;
+thick := 2 linethickness;
+
+def draw_lyric_tie (expr width_sharp) =
+       save padding, angularity, width, height, depth;
+
+       padding# := .4 staff_space#;
+       angularity := 2.5;
+       width# := max (min (width_sharp, max_width), min_width);
+       height# := (max (width# - min_width, 0) / (max_width - min_width))
+                  [min_height, max_height];
+       depth# := padding# + height#;
 
        set_char_box (0, 0,
-               .7 staff_space#, 0);
+               depth#, 0);
+
+       define_pixels (width, padding);
 
-       z1 = (-staff_space, -padding);
+       z1 = (-width / 2, -padding);
        z2 = (0, -d);
-       z3 = (staff_space, -padding);
+       z3 = (width / 2, -padding);
 
-       penpos1 (1.2 linethickness, 50);
-       penpos2 (2 linethickness, 90);
-       penpos3 (1.2 linethickness, 130);
+       penpos1 (thin, angularity * angle (z2 - z1) + 90);
+       penpos2 (thick, 90);
+       penpos3 (thin, angularity * angle (z3 - z2) + 90);
 
        fill z2l
                .. simple_serif (z3l, z3r, 90)
@@ -41,6 +57,14 @@ fet_beginchar ("lyric tie", "lyric");
                .. cycle;
 
        penlabels (1, 2, 3);
+enddef;
+
+fet_beginchar ("Short lyric tie", "lyric.short");
+       draw_lyric_tie (1.25 staff_space#);
+fet_endchar;
+
+fet_beginchar ("Default lyric tie", "lyric.default");
+       draw_lyric_tie (1.75 staff_space#);
 fet_endchar;
 
 fet_endgroup ("ties");
index 18728e57d9809de9b1865209cfb5e7677103b59d..88a9e9c7aa32198c24d6bad0b686e2e14b56850d 100644 (file)
@@ -937,25 +937,45 @@ the use of @code{\\simple} is unnecessary.
 Like simple-markup, but use tie characters for @q{~} tilde symbols.
 
 @lilypond[verbatim,quote]
-\\markup {
-  \\tied-lyric #\"Lasciate~i monti\"
-}
-@end lilypond"
-  (if (string-contains str "~")
-      (let*
-         ((half-space (/ word-space 2))
-          (parts (string-split str #\~))
-          (tie-str (markup #:hspace half-space
-                           #:musicglyph "ties.lyric"
-                           #:hspace half-space))
-          (joined  (list-join parts tie-str))
-          (join-stencil (interpret-markup layout props tie-str))
-          )
+\\markup \\column {
+  \\tied-lyric #\"Siam navi~all'onde~algenti Lasciate~in abbandono\"
+  \\tied-lyric #\"Impetuosi venti I nostri~affetti sono\"
+  \\tied-lyric #\"Ogni diletto~e scoglio Tutta la vita~e~un mar.\"
+}
+@end lilypond"
+  (define (replace-ties tie str)
+    (if (string-contains str "~")
+        (let*
+          ((half-space (/ word-space 2))
+           (parts (string-split str #\~))
+           (tie-str (markup #:hspace half-space
+                            #:musicglyph tie
+                            #:hspace half-space))
+           (joined  (list-join parts tie-str)))
+          (make-concat-markup joined))
+        str))
+
+  (define short-tie-regexp (make-regexp "~[^.]~"))
+  (define (match-short str) (regexp-exec short-tie-regexp str))
+
+  (define (replace-short str mkp)
+    (let ((match (match-short str)))
+      (if (not match)
+          (make-concat-markup (list
+            mkp
+            (replace-ties "ties.lyric.default" str)))
+          (let ((new-str (match:suffix match))
+                (new-mkp (make-concat-markup (list
+                          mkp
+                          (replace-ties "ties.lyric.default"
+                                        (match:prefix match))
+                          (replace-ties "ties.lyric.short"
+                                        (match:substring match))))))
+              (replace-short new-str new-mkp)))))
 
-       (interpret-markup layout
-                         props
-                         (make-concat-markup joined)))
-      (interpret-markup layout props str)))
+  (interpret-markup layout
+                    props
+                    (replace-short str (markup))))
 
 (define-public empty-markup
   (make-simple-markup ""))