Hi there,
Thank you for all your work on LilyPond!
It appears to be impossible to use a Melody_engraver in a Voice that also
includes a CueVoice. Here’s a LilyPond example that illustrates the issue:
```
\version "2.22.0"
\new Voice \with {
\consists "Melody_engraver"
\override Stem.neutral-direction = #'()
} {
<<
{ r }
\new CueVoice { c'' }
>>
}
```
LilyPond outputs:
GNU LilyPond 2.22.0
Processing `test.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...Assertion failed: (d == 1 || d == -1), function at, file
/private/tmp/lilypond-20210130-26352-lkbhbf/lilypond-2.22.0/build/../flower/include/drul-array.hh,
line 35.
All the best,
Nate
Hello,
The example can be reduced even further, showing
that the problem is not actually related to the
Melody_engraver or the CueVoice context:
\version "2.23.1"
\new Voice {
\override Stem.neutral-direction = #'()
<<
{ r }
\new Voice { c }
>>
}
Maybe try something like this to work around:
\version "2.23.1"
#(set-object-property! 'rest-neutral-direction 'backend-type? ly:dir?)
\layout {
\context {
\Voice
\consists "Melody_engraver"
\override Stem.neutral-direction = #'()
\override Stem.rest-neutral-direction = #UP
\override Stem.before-line-breaking =
#(grob-transformer 'before-line-breaking
(lambda (grob dummy)
(let ((original (ly:stem::calc-default-direction grob)))
(ly:grob-set-property!
grob
'default-direction
(cond ((memv original '(-1 1))
original)
((null? (ly:grob-object grob 'rests))
(ly:grob-property grob 'neutral-direction))
(else
(ly:grob-property grob
'rest-neutral-direction)))))))
}
}
\new Voice {
\time 3/4
<<
{ r }
\new Voice \relative c'' {
\autoBeamOff
a8 b g f b g |
c b d c b c |
}
>>
}
Best,
Jean Abou Samra
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond