lilypond-user
[Top][All Lists]
Advanced

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

Re: divisi staves and notehead merge (issue 3518 revisited)


From: Werner LEMBERG
Subject: Re: divisi staves and notehead merge (issue 3518 revisited)
Date: Sat, 14 Mar 2015 14:56:01 +0100 (CET)

> Please have a look at the `divisi-staves.ly' regression test, which
> is the solution to
> 
>   https://code.google.com/p/lilypond/issues/detail?id=3518
> 
> [Actually, this file contains undocumented features that deserves
> documentation due to its importance for orchestral music...]
> 
> I want a variation of this, namely solo violin + gli altri [...]
> Does lilypond have already a property to make the noteheads merge
> even if the stems are in the same direction?

I've just found out that adding

  \override NoteColumn.ignore-collision = ##t

does exactly the right thing, at least for the given example.  I guess
that this is just a work-around, since no real merging does happen...


  boring = \set Staff.keepAliveInterfaces = #'()
  tricky = \unset Staff.keepAliveInterfaces

  violsolo=\relative d' {
    \boring \repeat unfold 100 d4
    \tricky <d g'>2
    \boring \repeat unfold 98 d4
    \bar "|."
  }

  viol=\relative d' {
    \boring \repeat unfold 100 d4
    \tricky d4 d4
    \boring \repeat unfold 98 d4
    \bar "|."
  }

  \score {
    \new StaffGroup \with { \consists "Keep_alive_together_engraver" }
    <<
      \new Staff \with { instrumentName = "Violin solo"
                         shortInstrumentName = "V solo"
                         \override VerticalAxisGroup.remove-empty = ##t
                         \override VerticalAxisGroup.remove-first = ##t
                         \override VerticalAxisGroup.remove-layer = 1
                       } \violsolo

      \new Staff \with { instrumentName = "Violin gli altri"
                         shortInstrumentName = "V"
                         \override VerticalAxisGroup.remove-empty = ##t
                         \override VerticalAxisGroup.remove-first = ##t
                         \override VerticalAxisGroup.remove-layer = 1
                       } \viol
      \new Staff \with { instrumentName = "Violin"
                         shortInstrumentName = "V"
                         \override VerticalAxisGroup.remove-layer = 2
                         \override NoteColumn.ignore-collision = ##t
                       } << \violsolo \viol >>
    >>
    \layout {
      short-indent = 2\cm
      indent = 3\cm
    }
  }


I will now try it in a real-world example.


    Werner

PNG image


reply via email to

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