Jump to content

Creating arbitrary lines following notes across staves: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In the snippet, you'll see that &quot;s2&quot; was used instead of &quot;r2&quot; as a placeholder to space it out a little bit. <code>VoiceFollower</code> ignores this -- when r2 was used it would try to draw a line from the rest to the note head, while philosophically interesting would be wrong.
In the snippet, you'll see that &quot;s2&quot; was used instead of &quot;r2&quot; as a placeholder to space it out a little bit. <code>VoiceFollower</code> ignores this -- when r2 was used it would try to draw a line from the rest to the note head, while philosophically interesting would be wrong.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=729
 
\score {
\score {
   \new StaffGroup {
   \new StaffGroup {
Line 34: Line 32:
[[Category:Specific notation]]
[[Category:Specific notation]]
[[Category:Expressive marks]]
[[Category:Expressive marks]]
[[Category:Snippet]]

Latest revision as of 23:14, 21 November 2025

In the snippet, you'll see that "s2" was used instead of "r2" as a placeholder to space it out a little bit. VoiceFollower ignores this -- when r2 was used it would try to draw a line from the rest to the note head, while philosophically interesting would be wrong.

\version "2.24"

\score {
  \new StaffGroup {
    \set StaffGroup.followVoice = ##t
    <<
      \new Staff=one {
        \override VoiceFollower.style = #'dashed-line
          <<
            {c'1}
            {s2 \change Staff = "three" b2} 
          >>
        a1
        }
      \new Staff=two {
        \override VoiceFollower.style = #'dashed-line
        g'2 f' \change Staff = "one" e'1
      }
      \new Staff=three {
        \set followVoice = ##f
        r2 s \change Staff = "two" r1
      }
    >>
  }
}