lilypond-user
[Top][All Lists]
Advanced

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

Re: changing the length (height? positions? endpoints?) of an arpeggio


From: Torsten Hämmerle
Subject: Re: changing the length (height? positions? endpoints?) of an arpeggio
Date: Sat, 8 Sep 2018 13:09:58 -0700 (MST)

Kieren MacMillan wrote
> I’m trying to tweak the "length" of an arpeggio (by 1 staff space at the
> top), and can’t seem to find the correct incantation or doc reference.


Hi Kieren,

You can explicitly set an arpeggio's start/end positions by overriding the
positions property.
The internals reference is a bit misleading, as the standard property
descriptions mentions left/right only.
For an arpeggio, however, positions holds a pair of lower/upper position
values.

It is calculated by the ly:arpeggio::calc_positions function, and this
function can be used in a custom scheme function just subtracting a given
amount from the lower value and adding the same amount to the upper value.
A simple example, manipulating the "standard" positions by
subtracting/adding correctional values (0 at the lower end, 1 at the upper
end, as requested by you):


%%%  MWE begins
\version "2.19.80"

#(define (widen-arp grob)
   (let* ((pos (ly:arpeggio::calc-positions grob))
          (lower-corr 0.0)
          (upper-corr 1.0))
    (cons (- (car pos) lower-corr) (+ (cdr pos) upper-corr))))

{
  \override Arpeggio.positions = #widen-arp
  <c' e' g'>1\arpeggio
}
%%%  MWE ends

HTH,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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