lilypond-devel
[Top][All Lists]
Advanced

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

Re: Deeply nested staff groups


From: Carl Sorensen
Subject: Re: Deeply nested staff groups
Date: Tue, 30 Oct 2007 17:15:34 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Rune Zedeler <rz <at> daimi.au.dk> writes:

> at top of your program, then StaffGroups may contain StaffGroups - and 
> hence you can do arbitrary nesting of StaffGroups. But it is a very 
> dangerous thing to do - because it contains a cycle. For instance, the 
> following score
> 
> \score { \new Voice { c1 } }
> 
> segfauls. The problem is that lilypond needs to "figure out" that it 
> must insert a staff between the score and the voice. And in order to do 
> so, it looks through the hierarchy of contexts - and it gets stuck in 
> the cycle.
> But if you explicitly write
> 
> \score { \new Staff \new Voice { c1 } }
> 
> Then you don't run into the problem.

A while ago there was some discussion that we might not want to have lilypond
supply default contexts, because it hides the operation of the system.  It was
decided that the convenience of having lilypond put in the missing contexts was
worth the hidden structure.

Perhaps there could be a \strict or \explicit mode that would not supply default
contexts.  If you used the first example in \explicit mode, you'd get an error
message that said "no Staff context for Voice", and it would force you to use
the second example, thereby avoiding the segfault.

Carl






reply via email to

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