Graham King reported:
The Notation Reference says: " 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 }
Carl added:
I haven't looked at the code, but it appears to me that without the
dynamics, the hairpin is bound from the left edge of the first note column
to the right edge of the last note column.
With the omitted dynamics, the hairpin appears to be bound to the right
edge of the first note column and the left edge of the last note column.
Hazarding a guess that the dynamic text is bound to the note column, and
thus the hairpin moves out of the columns into the inter-column space.
And if the dynamic text overflows the column, the hairpin is shortened.
When the text is omitted, the hairpin can only move to the edge of the
column.