2016-02-04 23:57 GMT+01:00 Simon Albrecht <address@hidden>:
Hello,
is there any possibility to tweak direction of a tie generated via the
Completion_heads_engraver? The following tweaks both don’t work:
%%%%%%%%%%%
\version "2.19.36"
\layout {
\context {
\Voice
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
}
}
{
\once\override NoteHead.direction = 1
\once\override Tie.direction = 1
a'\breve
}
%%%%%%%%%%
Best, Simon
Hi Simon,
see below, comment inline.
\version "2.19.36"
%% Set TieUp for certain condition(s) in layout.
%% Written as a wrapper for default-direction, i.e `ly:tie::calc-direction'
%% This is only an example, demonstrating the method.
%% Find your own set of conditions.
%% Directly setting Tie.direction in { a'\breve } while using
%% "Completion_heads_engraver" does not work, because there is no Tie to
%% tweak, before the engraver did his work
#(define (my-tie-up grob)
(let* ((parent (ly:grob-parent grob X))
(staff-pos (ly:grob-property parent 'staff-position))
(dur-log (ly:grob-property parent 'duration-log))
(stem (ly:grob-object parent 'stem))
(stem-dir (ly:grob-property stem 'direction)))
(ly:grob-set-property! grob 'direction
(if (and (= staff-pos -1)
(= dur-log 0)
(= stem-dir 1))
UP
(ly:tie::calc-direction grob)))))
\layout {
\context {
\Voice
\remove "Note_heads_engraver"
\consists "Completion_heads_engraver"
\override Tie.after-line-breaking = #my-tie-up
}
}
{
a'\breve
}