bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Baroque NoteHeads won't merge without \new Voice


From: Jean Abou Samra
Subject: Re: Baroque NoteHeads won't merge without \new Voice
Date: Fri, 4 Nov 2022 18:27:52 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

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



Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]