Le 04/11/2022 à 18:14, David Poon a écrit :
When I use Baroque NoteHeads, noteheads in (temporary) different voices refuse to merge--unless I specifically create a new voice context for both voices (not just one as in the Temporary polyphonic passages example https://lilypond.org/doc/v2.22/Documentation/notation/multiple-voices#single_002dstaff-polyphony ).----- \version "2.20.0" \new Voice { \relative c'' { \override NoteHead #'style = #'baroque << % \new Voice { \voiceOne a b c } \new Voice { \voiceTwo a g c } } } ----- I.e., commenting out Baroque NoteHeads OR uncommenting \new Voice will both give the desired output, but the code as-is duplicates noteheads.
The problem is that your second voice created with \new Voice does not actually have baroque note heads, as you can see if you add a \breve note. This is because you use \override NoteHead.style = #'baroque (N.B. this is the newer syntax, NoteHead #'style is deprecated with recent versions), and this overrides NoteHead.style in the current Voice, not in other Voice contexts you create. If you want to override the style more generally than in the current Voice, you need to tell this to LilyPond with, for example, \override Staff.NoteHead.style = #'baroque Giving \version "2.22.2" \new Voice { \relative c'' { \override Staff.NoteHead.style = #'baroque << { \voiceOne a b c } \new Voice { \voiceTwo a g c c } >> } } It "works" with an extra \new Voice because then both voices have default (non-baroque) heads, whereas without that \new Voice, the voice you started at the beginning continues into the << >> construct. Then you have note heads with different styles, which is the reason why LilyPond refuses to merge them. Best, Jean
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond