[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: \hideNotes hides too many dots
From: |
Thomas Morley |
Subject: |
Re: \hideNotes hides too many dots |
Date: |
Mon, 19 Jun 2017 22:49:33 +0200 |
2017-06-18 12:32 GMT+02:00 Simon Albrecht <address@hidden>:
> Hello,
>
> this is an exemplary use case for \hideNotes:
>
> %%%%%%%%%%%%%%%%%
> \version "2.19.55"
>
> \new Staff <<
> \new Voice {
> \voiceOne
> c''16 e''16~
> \hideNotes
> e''4.
> }
> \new Voice {
> \voiceTwo
> c''8~ \oneVoice <c'' e''>4.
> }
>>>
> %%%%%%%%%%%%%%%%%
>
> However, \hideNotes also manages to hide the dot on the second e'', which I
> don’t quite know why, since it should be printed from the second voice.
As far as I understand, LilyPond drops one dot when merging the two dotted e''
See the terminal-output of:
#(define ((dots prop) dot-column)
(let* ((array (ly:grob-object dot-column 'dots))
(lst (if (ly:grob-array? array)
(ly:grob-array->list array)
'()))
(dots
(filter (lambda (g) (grob::has-interface g 'dots-interface)) lst)))
(format #t "\n\tdots ~a ~a" prop dots)))
displayDotsBeforeAndAfterLineBreaking = {
\override Staff.DotColumn.before-line-breaking = #(dots 'before-line-breaking)
\override Staff.DotColumn.after-line-breaking = #(dots 'after-line-breaking)
}
\new Staff <<
\displayDotsBeforeAndAfterLineBreaking
\new Voice {
\voiceOne
c''16 e''16~
\override Dots.color = #green
e''4.
}
\new Voice {
\voiceTwo
c''8~
\override Dots.color = #red
<c'' e''>4.
}
>>
Actually in the DotColumn are only two dots remaining: one from the
_upper_ Voice for e'' and one from the _lower_ Voice for c''
\hideNotes in the upper Voice now hides the dot for e''
I've no clue how this _could_ be fixed.
I failed to identify the code responsible for dropping one dot either.
While researching I noticed removing Dot_column_engraver or suiciding
DotColumn does not change this behaviour. So DotColumn seems to be not
the guilty one.
At least a work-around:
\new Staff <<
\new Voice {
\voiceOne
c''16 e''16~
\hideNotes
\revert Dots.transparent
e''4.
}
\new Voice {
\voiceTwo
c''8~
<c'' e''>4.
}
>>
Cheers,
Harm