[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cotrol of broken ties
From: |
Han-Wen |
Subject: |
cotrol of broken ties |
Date: |
Sun, 28 Jul 2002 12:41:15 +0200 |
address@hidden writes:
> How can I control broken ties? It is sometimes necessary that ties
> ending and starting a line should have different vertical/horizontal
> offsets due to the cautionary accidentals at the beginning of a line.
> Is there an example somehow? In general, I assume that tie properties
> can be accessed similarly to accidentals. Please give me an example
> to experiment.
You're the first one ever to ask about broken spanners, (I am surpised
no-one did it before), but there is no real way to control them except
by getting your hands dirty. The problem is that during input &
interpretation one doesn't know if a spanner is broken or not. I
haven't thought of what kind of interface should be provided.
Dirty method:
\header {
texidoc = "Broken spanners can be adjusted individually, but
this requires complicated scheme code.
"
}
#(define (my-callback grob)
(let* (
(o (get-original grob))
(b (if (ly-grob? o) (get-broken-into o) '() ))
)
;; Call the equivalent of Tie::after_line_breaking
;; if you're using this for other grob-types.
(if (and (>= (length b) 2) (eq? (car (last-pair b)) grob))
(ly-set-grob-property! grob 'extra-offset '(4 . -2))
)
))
#(debug-enable 'backtrace)
\score {\notes {
\property Voice.Tie \override #'after-line-breaking-callback =
#my-callback
c1\break ~ c2 ~ c
}
\paper { linewidth= 5.0 \cm }
}
--
Han-Wen Nienhuys | address@hidden | http://www.cs.uu.nl/~hanwen