[Top][All Lists]

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

Weird intermediate context creation

From: Dan Eble
Subject: Weird intermediate context creation
Date: Mon, 6 Jan 2020 10:16:44 -0500

I find it strange that this code in input/regression/ ends up on 
two staves rather than one:

music = \repeat unfold 16 { c''4\bendAfter #-4 }
sixteens = \repeat unfold 64 { c'16 }

\new Score {
  << \music \sixteens >>

I have a pretty good idea of why it is happening, and I am currently testing a 
change that affects 4 layout regtests including this one.

The question is whether changing it is the right thing to do.  On the one hand,

the current result is strange
the NR is not clear as to whether the current result is expected; I lean toward 
reading it as unexpected
the NR advises against relying on implicit context creation anyway

NR section 5.1.2 begins,

LilyPond will create lower-level contexts automatically if a music expression 
is encountered before a suitable context exists, but this is usually successful 
only for simple scores or music fragments like the ones in the documentation.

The NR defines "bottom-level contexts" to include Voice and to exclude Staff, 
but leaves the reader to draw his own conclusion of what  "lower-level 
contexts" are.  I guess it means any required contexts that don't yet exist.

I'm not sure from this whether to expect \music and \sixteens to end up in 
separate Voice contexts.  My intuition is that after a Voice context is created 
for \music, "a suitable context exists" for \sixteens.

On the other hand, changing this would change how existing scores that rely on 
automatic context creation are engraved.  Is a change justified either on the 
grounds that the current behavior is a bug or that the NR gives fair warning 
not to rely on this feature?

reply via email to

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