lilypond-user
[Top][All Lists]
Advanced

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

Re: Two arpeggio lines (up and down) next to each other


From: Lukas-Fabian Moser
Subject: Re: Two arpeggio lines (up and down) next to each other
Date: Sun, 10 Oct 2021 18:16:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0


The problem (shown in the third example) is that it doesn’t stretch to match 
the chord height, like a normal arpeggio does. I don’t have time — and maybe 
not even the skill — to do this The Right Way™ right now, but hopefully Someone 
Else™ will take it to the goal line.

One could the default arpeggio stencil machinery do its job twice:

\version "2.22"

arpeggioUpDown = {
  \override Arpeggio.stencil =
  #(lambda (grob)
     (let ((one '())
           (two '()))
     (ly:grob-set-property! grob 'arpeggio-direction UP)
     (set! one (ly:arpeggio::print grob))
     (ly:grob-set-property! grob 'arpeggio-direction DOWN)
     (set! two (ly:arpeggio::print grob))
     (ly:stencil-add
      one
      (ly:stencil-translate-axis two 1.2 X))))
  \override Arpeggio.direction = #RIGHT
}

{
  \once \arpeggioUpDown
  <c' e' g' c''>\arpeggio
}

The problem is that this arpeggio is not taken into account for spacing: The next note will be too close. I'm not yet sure what would be The Right Way to change this, as neither X-extent nor extra-spacing-width of the arpeggio seem to have an effect for spacing to the right. You can tweak (for instance) NoteHead's extra-spacing-width, but that is far from elegant.

Lukas




reply via email to

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