]> git.donarmstrong.com Git - lilypond.git/commitdiff
Laissez-vibrer ties attached to notes with cross-staff stems are cross-staff (issue...
authorMike Solomon <mike@apollinemike.com>
Wed, 8 May 2013 05:44:06 +0000 (07:44 +0200)
committerMike Solomon <mike@apollinemike.com>
Wed, 8 May 2013 05:44:06 +0000 (07:44 +0200)
This moves towards a model of cross staff where cross staff is defined as
"Any grob that is either not an element of a vertical axis group or whose
relative extent with respect to the vertical axis group of which it is an
element changes as a result of how far apart two or more vertical axis
groups are spaced."

The practical ramifications of this patch are that less programming errors
are triggered and there is less chance that early vertical alignment will
occur.

input/regression/semi-tie-cross-staff.ly [new file with mode: 0644]
scm/define-grobs.scm
scm/output-lib.scm

diff --git a/input/regression/semi-tie-cross-staff.ly b/input/regression/semi-tie-cross-staff.ly
new file mode 100644 (file)
index 0000000..68d72f5
--- /dev/null
@@ -0,0 +1,23 @@
+\version "2.17.18"
+
+\header {
+  texidoc = "Cross-staff @code{RepeatTie} and @code{LaissezVibrerTie}
+do not trigger programming errors for circular dependencies in direction.
+"
+}
+
+<<
+  \new Staff = "up" \relative c' {
+    f8
+    \change Staff = "down"
+    c\laissezVibrer eeses
+    \change Staff = "up"
+    f
+    f8
+    \change Staff = "down"
+    c eeses!\repeatTie
+    \change Staff = "up"
+    f
+  }
+  \new Staff = "down" { \clef bass s1 }
+>>
index 1b834a2e2d28c8fb007b1b3d7ed7ea3056551285..aa7c7923a9bf3887ed481ef1f3c016b66af0b0bb 100644 (file)
    (LaissezVibrerTie
      . (
        (control-points . ,ly:semi-tie::calc-control-points)
+       (cross-staff . ,semi-tie::calc-cross-staff)
        (details . ((ratio . 0.333)
                    (height-limit . 1.0)))
        (direction . ,ly:tie::calc-direction)
 
     (RepeatTie
      . (
+       (cross-staff . ,semi-tie::calc-cross-staff)
        (control-points . ,ly:semi-tie::calc-control-points)
        (details . ((ratio . 0.333)
                    (height-limit . 1.0)))
index caa7032c70b9a5879f3a4adb05f899d1b3196b9a..41768b5c62639da9b968175abe150879460b65fc 100644 (file)
@@ -1288,6 +1288,12 @@ parent or the parent has no setting."
 (define-public (laissez-vibrer::print grob)
  (ly:tie::print grob))
 
+(define-public (semi-tie::calc-cross-staff grob)
+  (let* ((note-head (ly:grob-object grob 'note-head))
+         (stem (ly:grob-object note-head 'stem)))
+    (and (ly:grob? stem)
+         (ly:grob-property stem 'cross-staff #f))))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; volta-bracket