[Top][All Lists]

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

Re: Dynamics context spawns additional contexts when polyphonic

From: David Kastrup
Subject: Re: Dynamics context spawns additional contexts when polyphonic
Date: Thu, 31 Oct 2013 14:02:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Valentin Villenave <address@hidden> writes:

> 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

Remove \Staff here, or you'll just copy its definition and its effects.

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

      \denies Dynamics

here (and elsewhere you are putting \Dynamics) to avoid Dynamics being
created without enclosing \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?

Doesn't work.  \\ gets operated on when scorifying.


\void \displayLilyMusic
#(ly:score-music #{ \score { \new Dynamics {
                             a1\f << a \\ b\p >> } } #})

for an illustration.  Note that no engraver is being run here yet.

David Kastrup

reply via email to

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