[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arpeggio line
From: |
Thomas Morley |
Subject: |
Re: arpeggio line |
Date: |
Thu, 12 Jul 2012 12:22:11 +0200 |
2012/7/12 Mario Moles <address@hidden>:
> Hi!
>
> I do not understand how to do arpeggio with a straight line.
>
> You know how to do?
>
> Reagards!
Hi Mario,
try the code below. If you want a longer line add a
'positions-override as shown in the examples.
\version "2.15.39"
arpeggioStrikeDown = {
\override Arpeggio #'stencil =
#(lambda (grob)
(let* ((pos (ly:grob-property grob 'positions))
(ln (grob-interpret-markup grob (markup #:draw-line
`(0 . ,(- (interval-length pos))))))
(arrow-head (grob-interpret-markup grob (markup
#:arrow-head Y DOWN #f))))
(ly:stencil-add
(ly:stencil-translate-axis ln (interval-end pos) Y)
(ly:stencil-translate-axis arrow-head (interval-start pos) Y))))
% Perhaps you may want to adjust the 'X-extent-override
\override Arpeggio #'X-extent = #'(-0.4 . 0.4)
\override Arpeggio #'Y-extent =
#(ly:make-unpure-pure-container
ly:grob::stencil-height
(lambda (grob start end) (ly:grob::stencil-height grob)))
% With 2.14.2 comment the 'Y-extent-override above, and uncomment the next line.
%\override Arpeggio #'minimum-Y-extent = #'(-0.1 . 0.1)
}
arpeggioStrikeUp = {
\override Arpeggio #'stencil =
#(lambda (grob)
(let* ((pos (ly:grob-property grob 'positions))
(ln (grob-interpret-markup grob (markup #:draw-line
`(0 . ,(- (interval-length pos))))))
(arrow-head (grob-interpret-markup grob (markup
#:arrow-head Y UP #f))))
(ly:stencil-add
(ly:stencil-translate-axis ln (interval-end pos) Y)
(ly:stencil-translate-axis arrow-head (interval-end pos) Y))))
% Perhaps you may want to adjust the 'X-extent-override
\override Arpeggio #'X-extent = #'(-0.4 . 0.4)
\override Arpeggio #'Y-extent =
#(ly:make-unpure-pure-container
ly:grob::stencil-height
(lambda (grob start end) (ly:grob::stencil-height grob)))
% With 2.14.2 comment the 'Y-extent-override above, and uncomment the next line.
%\override Arpeggio #'minimum-Y-extent = #'(-0.1 . 0.1)
}
\relative c' {
\arpeggioStrikeDown
<c' e g bes>\arpeggio
<c, e g bes>\arpeggio
\arpeggioStrikeUp
<c' e g bes>\arpeggio
\arpeggioStrikeDown
\once\override Arpeggio #'positions = #'(-4 . 3)
<c, e g bes>\arpeggio
\once\override Arpeggio #'positions = #'(-3.5 . 2.5)
\arpeggioStrikeUp
<c e g bes>\arpeggio
\arpeggioNormal
<c e g bes>\arpeggio
}
\relative c {
\time 3/16
\arpeggioStrikeDown
\once\override Arpeggio #'positions = #'(-6 . 3)
<e c' fis dis'>16\mf\arpeggio
}
HTH,
Harm
- arpeggio line, Mario Moles, 2012/07/11
- Re: arpeggio line,
Thomas Morley <=
- Re: arpeggio line, Mario Moles, 2012/07/12
- Re: arpeggio line, Janek WarchoĊ, 2012/07/12
- Re: arpeggio line, David Nalesnik, 2012/07/15
- Message not available
- Re: arpeggio line, David Nalesnik, 2012/07/15
- Re: arpeggio line, David Nalesnik, 2012/07/15
- Re: arpeggio line, David Nalesnik, 2012/07/15
- Re: arpeggio line, Mario Moles, 2012/07/15
- Re: arpeggio line, Nick Payne, 2012/07/18
- Re: arpeggio line, David Nalesnik, 2012/07/18