lilypond-devel
[Top][All Lists]
Advanced

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

Re: Deeply nested staff groups


From: Rune Zedeler
Subject: Re: Deeply nested staff groups
Date: Mon, 29 Oct 2007 04:30:04 +0100
User-agent: Thunderbird 1.5.0.14pre (X11/20071022)

Reinhold Kainhofer skrev:

From a user's POV, even requiring InnerStaffGroup instead of StaffGroup is not
obvious.

I agree.
Actually, you might be able to circumvent the problems with the circular references.
If you insert

\layout {
  \context {
    \StaffGroup
    \accepts "StaffGroup"
  }
}

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.
You might be able to write your converted files in such a way that it works with a cycle in the context-hierarchy.

But I am not sure of which other situations may trigger problems.

In all cases this must be considered an exceptionally ugly hack.

-Rune




reply via email to

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