Hi Karol,
On Tue, Apr 8, 2014 at 12:24 PM, Karol Majewski <[email protected]> wrote:
> Seems that solution given by David Nalesnik:
>
>
> http://code.google.com/p/lilypond/issues/attachmentText?id=2245&aid=22450001000&name=atest-09.ly&token=vtUjpiq5vmGAgIRRqIpMxfhpYmg%3A1396976425593
>
> has one drawback. When dynamic text is assigned to whole measure rest, the
> file won't compile. Is this fixable?
>
> %%%%%%%%%%%%%%%
>
> \version "2.19.4"
>
> \include "atest-09.ly"
>
> {
> R1*4/4 \p
> }
>
The attached should do the trick, but I confess that I'm having difficulty
picturing a situation where you'd need to attach a dynamic to a rest!
HTH,
David
\version "2.19.3"
#(define test
(lambda (grob)
(let* ((X-parent (ly:grob-parent grob X))
(note-head? (grob::has-interface X-parent 'note-head-interface)))
(if note-head?
(let* ((note-column (ly:grob-parent X-parent X))
(note-heads (ly:grob-object note-column 'note-heads))
(sorted-note-heads
(sort (ly:grob-array->list note-heads)
(lambda (p q)
(> (ly:grob-property q 'staff-position)
(ly:grob-property p 'staff-position)))))
(lowest (car sorted-note-heads))
(highest (car (reverse sorted-note-heads)))
(stem (ly:grob-object note-column 'stem)))
(set! (ly:grob-parent grob X)
(if (= UP (ly:grob-property stem 'direction))
lowest
highest)))))))
{
\override DynamicText #'before-line-breaking = #test
R1*4/4 \p
}_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user