0

In reference to this post I would like to write a scheme function in Lilypond which would help me not to manually define the position of each point of the lines.

Here a simplified example of the problem:

\version "2.24.1"

samplePath = 
    #'(
        (moveto -4.96 0)
        (lineto -1.7 2)
        (moveto 1 0)
        (lineto -1.7 2)
        )

\score {
    \new Staff {
        \time 1/4
        \clef "treble"
        \override Beam.positions = #'(5 . 5)
        \override Beam.transparent = ##t
        g'8 d'^\markup \path #0.1 #samplePath
    }
    \layout {}
}

I have 2 8th notes to which I removed the beam. Then on top of these notes I add a \markup statement which calls samplePath, a function which draws diagonal lines from the top of the note stems to a fixed point ((-1.7 2) in this case).

How I could formulate a Scheme function that accepts a list of notes and draws the lines that converge to one point getting the top position of each note stems? Is it even possible?

I took inspiration from this manual page but not knowing scheme and being a beginner in Lilypond I struggle to understand the Internal Documentation.

Thank you!

ddgg
  • 145
  • 1
  • 10

0 Answers0