Valentin Villenave <valen...@villenave.net> writes: > On Thu, Oct 31, 2013 at 12:24 PM, David Kastrup <d...@gnu.org> 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 Add \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. Try \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 _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond