bug-lilypond
[Top][All Lists]
Advanced

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

Re: Dynamics context spawns additional contexts when polyphonic


From: Valentin Villenave
Subject: Re: Dynamics context spawns additional contexts when polyphonic
Date: Thu, 31 Oct 2013 13:49:43 +0100

On Thu, Oct 31, 2013 at 12:24 PM, David Kastrup <address@hidden> wrote:
> But you did not put \\ in a DynamicsStaff context, so it has no suitable
> container where it could place separate Dynamics contexts.

Something like that?

\layout {
  \context {
    \Staff
    \type "Engraver_group"
    \name "DynamicsStaff"
    \alias "Staff"
    \accepts "Dynamics"
    \defaultchild "Dynamics"
  }
  \context {
    \PianoStaff
    \accepts DynamicsStaff
  }
}

[It doesn’t seem to make a difference, but I’ll keep looking.]

> First you have to figure out what you want to happen here.  Do you want
> two Dynamics contexts with different orientation and settings?

Not if it can be avoided: I can’t see any need for such things as
\voiceOne or  \stemDown here. Ideally, the VoiceSeparator should just
be ignored so as to avoid such unrequired additional staves to appear.
(I can’t see why anyone would *want* this behavior to happen in a
Dynamics context.)

> If not, you'll want to filter out the \\ completely.  It's probably
> easiest to do that using \tag and \removeWithTag, but of course it is
> also reasonably easy to do this using a music function.

Indeed. If there was such a thing as a Voice_Separator_Engraver, we
could just \remove it from the Dynamics context, which would be
cleaner. Of course, it may be done the other way around by
\consist-ing a Scheme engraver into the Dynamics context which only
removes VoiceSeparator items. Is it too much of a hack?

Cheers,
Valentin.



reply via email to

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