[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \omit dynamic occupies space
From: |
Thomas Morley |
Subject: |
Re: \omit dynamic occupies space |
Date: |
Wed, 27 Apr 2016 01:18:18 +0200 |
2016-04-25 22:07 GMT+02:00 Graham King <address@hidden>:
> The Notation Reference says [1]: " omit [music] - item (symbol list or
> music): Set item's "stencil" property to #f, effectively omitting it
> without taking up space. "
>
> However, when applied to dynamics, space is taken up. This is
> inconvenient, as one has to resort to \tag #'pdf {...} and \tag #'midi
> {...} constructs to recover the space.
>
>
> \version "2.19.40"
>
> {
> <>^\markup "no dynamics"
> c'2\< 2\! 2\> 2\!
> <>^\markup "\omit dynamics"
> c'2-\omit\p\< 2-\omit\f 2-\omit\f\> 2-\omit\p
> }
>
>
>
>
> Hope this helps
> -- Graham
>
> [1]
> http://lilypond.org/doc/v2.19/Documentation/notation/available-music-functions#index-omit
>
Hi Graham,
I guess at the point of time \omit DynamicText is applied the bounds
of the Hairpin (and so the extension of it) is already calculated.
So \omit DynamicText works, but the Hairpin still keeps it's extension.
Not sure if this should count as an enhancement, but at least it's a
documentation issue.
Please test this workaround to reset the bounds of the Hairpin:
\version "2.19.40"
resetBounds =
\override Hairpin.after-line-breaking =
#(lambda (grob)
(let ((bound-left (ly:spanner-bound grob LEFT))
(bound-right (ly:spanner-bound grob RIGHT)))
(if (eq? (grob::name bound-left) 'DynamicText)
(ly:spanner-set-bound! grob LEFT
(ly:grob-parent bound-left X)))
(if (eq? (grob::name bound-right) 'DynamicText)
(ly:spanner-set-bound! grob RIGHT
(ly:grob-parent bound-right X)))))
{
<>^\markup "no dynamics"
c'2\< c'2\! c'2\> c'2\!
<>^\markup "\omit dynamics"
\omit DynamicText
\resetBounds
c'2\p\< c'2\f c'2\f\> c'2\p
}
Cheers,
Harm
- \omit dynamic occupies space, Graham King, 2016/04/25
- Re: \omit dynamic occupies space,
Thomas Morley <=
- Message not available
- Re: \omit dynamic occupies space, Thomas Morley, 2016/04/27
- Re: \omit dynamic occupies space, David Kastrup, 2016/04/27
- Re: \omit dynamic occupies space, Thomas Morley, 2016/04/27
- Re: \omit dynamic occupies space, Graham King, 2016/04/27
- Re: \omit dynamic occupies space, Carl Sorensen, 2016/04/27
- Re: \omit dynamic occupies space, Phil Holmes, 2016/04/29