On 2019-12-21 3:32 am, Robert Blackstone wrote:
Hi Robin,
I tried some of the procedures I found on
https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00202.html
<https://lists.gnu.org/archive/html/lilypond-user/2019-05/msg00202.html>,
the thread you advised me to look at but they did not help me very
much.
So I tried to develop some trick or tweak without having to program
things with scheme, with which I have no experience at all.
Anyway, I found something that gave me a result, not quite identical
to what I wanted to get, but good enough for me and probably
sufficiently clear for a pianist.
Looks like I may be a little late to the party.
Here is my attempt at hacking the BarLine stencil to add overlapping
ties:
%%%%
\version "2.19.83"
laissezVibrerBar = #(define-music-function
(positions) (number-pair-list?)
(define (stencil-proc grob)
(let* ((th (ly:staff-symbol-line-thickness grob))
(bd (ly:item-break-dir grob))
(orig (ly:bar-line::print grob))
(xex (ly:stencil-extent orig X))
(x (interval-index xex 0))
(w (+ 0.8 (/ (- (interval-length xex) th) 2))))
(define (position-tie pos)
(let* ((y (+ (car pos) (* 2 th (cdr pos))))
(tie (make-tie-stencil
(cons (- x w) y) (cons (+ x w) y)
th (cdr pos)))
(xex (ly:stencil-extent tie X))
(yex (ly:stencil-extent tie Y)))
(ly:make-stencil (ly:stencil-expr tie)
(cons (car xex) (if (> 0 bd) x (cdr xex))) yex)))
(ly:stencil-add orig
(apply ly:stencil-add (map position-tie positions)))))
#{ \override Staff.BarLine.stencil = $stencil-proc #})
laissezVibrerBarUpper =
\once \laissezVibrerBar #'((2 . 1) (0 . -1) (-1 . -1))
Upper = { \clef "treble"
<a' c'' d''>1\laissezVibrer
\laissezVibrerBarUpper
R1 \laissezVibrerBarUpper \bar "||"
R1 \laissezVibrerBarUpper \bar ":|.|:" \break
R1 \laissezVibrerBarUpper \bar ""
R1 \laissezVibrerBarUpper \bar "."
R1 \laissezVibrerBarUpper \bar "|."
}
laissezVibrerBarLower =
\once \laissezVibrerBar #'((2 . 1) (-1 . -1) (-3 . -1))
Lower = { \clef "bass"
<f, c g>1\laissezVibrer
\laissezVibrerBarLower
\repeat unfold 5 { R1 \laissezVibrerBarLower }
}
\paper { #(set-paper-size "a7landscape")
indent = 0 ragged-right = ##f tagline = ##f }
\new PianoStaff << \new Staff \Upper \new Staff \Lower >>
%%%%
-- Aaron Hill