lilypond-user
[Top][All Lists]
Advanced

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

Re: guide finger


From: pabuhr
Subject: Re: guide finger
Date: Mon, 20 Aug 2012 21:45:37 -0700

Thank you so much. However, because "rotate" performs its rotation around the
center of the character I need to make a small adjustment. There is a
"rotation" routine allowing rotation at an arbitrary point but it appears to be
solely for music not markups. I tried the following change using "translate"
but there is no "translate-guide" routine, which was a guess on my part after
looking at the way "rotate" is used. I have attempted to locate a list of these
Scheme routines but been unsuccessful. I even downloaded the GIT source for
lilypond and tried to find them there. So I have done due diligence, but I may
have done the wrong things. Can someone show me how to make translate move the
character? I can do the fine tuning of the position after that.

#(define (gx rotate-guide fingering)
  (let ((music (make-music 'FingeringEvent))
        (finger (ly:music-property fingering 'digit))
        (guide-char #x2013))
    (set! (ly:music-property music 'tweaks)
      (acons 'stencil
         (lambda (grob)
           (grob-interpret-markup grob
                      (make-concat-markup
                       (list
                        (make-rotate-markup rotate-guide (make-char-markup 
guide-char))
;;                        (make-translate-markup translate-guide '(2 . 3) 
(make-rotate-markup rotate-guide (make-char-markup guide-char)))
                        (number->string finger)))))
             (ly:music-property music 'tweaks)))
    music))

==============================================================================


   You might consider upgrading to one of the current development versions if
   you're interested in writing functions like this.  There is now quite a bit
   more flexibility and power to music functions (thanks to David Kastrup).

I am using GNU LilyPond 2.15.41 even though my files still have "\version
"2.14.2"" at the start. Again, I spent some time trying to locate scheme music
functions but was wholly unsuccessful. But I may just be searching with the
wrong magic phrases.



reply via email to

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