Le 11/06/2022 à 17:48, Kieren MacMillan a écrit :
Hi all,

Am I the only one that wishes this snippet behaved “as expected”**?

%%%  SNIPPET BEGINS
\version "2.22.1"

\new CueVoice {
   c'4 4 4 4
   \voices 1,2 << { d'4 4 4 4 } \\ { b2 2 } >>
   c'4 4 4 4
}
%%%  SNIPPET ENDS

** By “as expected”, I mean that I believe most users would expect all of the 
notes within a \new CueVoice {} construct to behave like a CueVoice, and thus 
(e.g.) be of the same font size. I basically understand why it behaves as it 
does… but is there an easy way to make this Do The Right Thing™ without the 
need for extra coding (e.g., \tiny) on the part of the user?


Yeah, that's a bit unfortunate. Basically, the default
child of Staff is Voice, and there isn't a way for
a command issued in CueVoice to "know" that it's in
CueVoice and let other CueVoices be created instead.
You could use this hack though:

\version "2.22.1"

\layout {
  \context {
    \Staff
    \accepts CueGroup
  }
  \context {
    \name CueGroup
    \type Engraver_group
    \accepts CueVoice
    \alias Staff
  }
}

\new CueGroup {
  c'4 4 4 4
  \voices 1,2 << { d'4 4 4 4 } \\ { b2 2 } >>
  c'4 4 4 4
}


Best,
Jean



Reply via email to