From: Mike Solomon Date: Wed, 8 May 2013 05:44:06 +0000 (+0200) Subject: Laissez-vibrer ties attached to notes with cross-staff stems are cross-staff (issue... X-Git-Tag: release/2.17.18-1~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=dd07c723a360a373a7d833e56fb36c16e18016de;p=lilypond.git Laissez-vibrer ties attached to notes with cross-staff stems are cross-staff (issue 1296) 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. --- diff --git a/input/regression/semi-tie-cross-staff.ly b/input/regression/semi-tie-cross-staff.ly new file mode 100644 index 0000000000..68d72f5852 --- /dev/null +++ b/input/regression/semi-tie-cross-staff.ly @@ -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 } +>> diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 1b834a2e2d..aa7c7923a9 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1221,6 +1221,7 @@ (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) @@ -1827,6 +1828,7 @@ (RepeatTie . ( + (cross-staff . ,semi-tie::calc-cross-staff) (control-points . ,ly:semi-tie::calc-control-points) (details . ((ratio . 0.333) (height-limit . 1.0))) diff --git a/scm/output-lib.scm b/scm/output-lib.scm index caa7032c70..41768b5c62 100644 --- a/scm/output-lib.scm +++ b/scm/output-lib.scm @@ -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