Hello,

In my score I have a section where I need a line from one part to cross other staves and point to another part. I've been able to adapt GridLine to appear when I need it, but I'd like to change the appearance: specifically, make the line dashed and add an arrow at the top. I do not need this in the parts, it is mainly for the conductor's reference. The parts will be cued another way.

The code below combines the two possibilities I can think of and shows where I've gotten to. The problems are I can't figure out how to make the markup version NOT affect the spacing between staves, and just draw over the top of them; or alternatively, how to get GridLine to be dashed with an arrowhead on top. I'd prefer the GridLine solution, since that will stretch vertically with the system if necessary.

Is this possible with GridLine? If not, is it possible with a markup?

\version "2.19.17"

musicA = {
  c'4 c' c' c'
}

verticalLine = ^\markup {
  \center-column {
    \arrow-head #Y #UP ##t
    \draw-dashed-line #'(0 . 18)
  }
}

musicB = {
  \override Score.GridLine.extra-offset = #'(0.0 . 2.0)
  \override Score.GridLine.line = #'dashed
  \hide Score.GridLine
  b4\verticalLine b b \revert Score.GridLine.transparent b
}

\score {
  <<
    \new Staff { \musicA }
    \new Staff \with {
      \consists "Grid_point_engraver"
      gridInterval = #(ly:make-moment 1/4)
    } { s1 }
    \new Staff \with {
      \consists "Grid_point_engraver"
      gridInterval = #(ly:make-moment 1/4)
    } { \musicB }
  >>
  \layout {
    \context {
      \Score
      \consists "Grid_line_span_engraver"
      \override NoteColumn.X-offset = #-0.5
    }
  }
}

Thanks!
James Worlton

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to