[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Re: Changed bracket behaviour
From:       Jogchum Reitsma <j.reitsma () hccnet ! nl>
Date:       2022-01-25 15:20:58
Message-ID: 743adfa5-7689-7ac2-b425-134513e9b3d1 () hccnet ! nl
[Download RAW message or body]

Hi Jean,

Thanks a lot, this gives what is wanted.

Thanks also for the elaborate explanation you give, is much appreciated!

with kind regards,

Jogchum Reitsma

Op 25-01-2022 om 13:42 schreef Jean Abou Samra:
> 
> 
> I guess you are trying to do (simplified example):
> 
> \score {
> \new ChoirStaff <<
> \new Staff { c'1 }
> \new Staff { c'1 }
> > > 
> \new ChoirStaff <<
> \new Staff { c'1 }
> \new Staff { c'1 }
> > > 
> }
> 
> 
> That's not what LilyPond expects. In a \score block,
> there must be one music expression, hence the warning
> "spurious expression in \score". Please see
> https://lilypond.org/doc/v2.22/Documentation/learning/score-is-a-_0028single_0029-compound-musical-expression \
>  
> The problem is that there are several of them here,
> and you are not telling LilyPond how to group them.
> They have to be in parallel, not one after the other,
> so they should be surrounded by << >>.
> 
> \score {
> <<
> \new ChoirStaff <<
> \new Staff { c'1 }
> \new Staff { c'1 }
> > > 
> \new ChoirStaff <<
> \new Staff { c'1 }
> \new Staff { c'1 }
> > > 
> > > 
> }
> 

> This gives the default grouping, documented at
> https://lilypond.org/doc/v2.22/Documentation/notation/displaying-staves.html#grouping-staves \
>  
> Namely, a mere bar to group the staves, and
> no connected bar lines. That is exactly what
> you want here.
> 
> To elaborate: \new GrandStaff does not necessarily
> call for << >> even if that is typically what you
> want to feed it. The syntax is \new GrandStaff xxx
> where xxx is any music expression. You could just as
> well say
> 
> \new GrandStaff {
> <<
> { c'1 }
> { c'1 }
> > > 
> <<
> { d'1 }
> { d'1 }
> > > 
> }
> 
> even if that does not make a lot of sense
> musically.
> 
> 
> 
> > Only the first system is rendered.
> > 
> > The second solution leads to the same result/error message.
> > 
> > While I admit that the Grandstaff-option leads to undesirable spanned 
> > barlines, in version 2.19.82 it performed the wanted grouping, 
> > without the extra brace seen in 2.23...
> > 
> 
> 
> This change was intended. What's happening in 2.22 and
> earlier is that GrandStaff does not accept ChoirStaff, so
> the GrandStaff actually does not receive any music at all
> and ChoirStaff contexts are inserted inside Score. This
> has the consequence that the expected brace is not
> inserted. There are a number of similar cases. They
> were sorted out in the development series by this
> change in the LilyPond sources:
> 
> commit e31b0b75a9a7b6e01ecd9c9a05dc3108a89273be
> Author: Jean Abou Samra <jean@abou-samra.fr>
> Date:   Sat Apr 17 11:48:58 2021 +0200
> 
> Derive all StaffGroup-like contexts from StaffGroup
> 
> Previously, there were many inconsistencies between the context types
> StaffGroup, ChoirStaff, GrandStaff and PianoStaff.  They had 
> differences
> in their lists of accepted contexts, and setting localAlterations 
> or not.
> This lets ChoirStaff and GrandStaff inherit from StaffGroup 
> (PianoStaff
> still inherits from GrandStaff) to keep all of them in sync.
> 
> StaffGroup gains a bunch of \accepts, so it accepts everything also
> accepted by Score.
> 
> This fixes a problem occurring when a TabStaff was included in a 
> ChoirStaff.
> The latter did not accept it, causing a StaffGroup to be inserted 
> in between,
> with its own bracket.
> 
> Closes: #6094
> 
> 
> In summary: your score was relying on buggy behavior.
> Fortunately, it's easy to fix it by using the method
> that is documented to give the behavior you want.
> 
> 
> Hope that helps,
> Jean
> 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic