[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get the positions of a beam (or other grob with positions)
From: |
Janek Warchoł |
Subject: |
Re: Get the positions of a beam (or other grob with positions) |
Date: |
Sat, 19 May 2012 15:03:47 +0200 |
Hi David & all,
i want to make arpeggios longer (so that they overshoot the chords a
bit). I've modified your offsetBeamPositions function to work on
Arpeggios instead of Beams (that was easy), but i'm quite surprised to
find that it doesn't work correctly with cross-staff arpeggios. Do
you have any ideas why? Maybe this is a bug in LilyPond?
offsetArpeggioPositions =
#(define-music-function (parser location offsets) (pair?)
#{
\override Arpeggio #'positions = #(lambda (grob)
(let* ((func (assoc-get 'positions (cdr
(ly:grob-basic-properties grob))))
(pos (func grob)))
(coord-translate pos offsets)))
#})
\relative c' {
<c e g c>2\arpeggio
\offsetArpeggioPositions #'(-1 . 1) % works perfectly
<c e g c>2\arpeggio
}
\new PianoStaff \relative c' <<
\set PianoStaff.connectArpeggios = ##t
\new Staff {
\offsetArpeggioPositions #'(-10 . 10) % strange results
<e g>2\arpeggio
}
\new Staff {
\clef bass
<c, e>2\arpeggio
}
>>
% compare with output without your function:
\new PianoStaff \relative c' <<
\set PianoStaff.connectArpeggios = ##t
\new Staff {
<e g>2\arpeggio
}
\new Staff {
\clef bass
<c, e>2\arpeggio
}
>>
% cheers,
% janek
- Get the positions of a beam (or other grob with positions), Urs Liska, 2012/05/17
- Re: Get the positions of a beam (or other grob with positions), David Nalesnik, 2012/05/17
- Re: Get the positions of a beam (or other grob with positions),
Janek Warchoł <=
- Re: Get the positions of a beam (or other grob with positions), David Nalesnik, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), David Kastrup, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Thomas Morley, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), David Kastrup, 2012/05/23