On 3 August 2010 01:55, Antheo <[email protected]> wrote:
> Ideally I'd like to have the following syntax: {f \shift a-1} where the
> \shift command would add a dash and offset the finger number to be aligned
> with the note. Or it could be {f a\shift-1}.
The latter syntax is easier to implement (and more in keeping with
LilyPond's postfix convention):
shift =
#(define-music-function (parser location fingering) (ly:music?)
(let ((music (make-music 'FingeringEvent))
(finger (ly:music-property fingering 'digit)))
(set! (ly:music-property music 'tweaks)
(acons 'stencil
(lambda (grob)
(grob-interpret-markup grob
(make-concat-markup
(list (make-char-markup #x2012)
(number->string finger)))))
(ly:music-property music 'tweaks)))
music))
\relative c' {
% must use hyphen before \shift
c4-\shift -3
}
Cheers,
Neil
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user