Hi David,

> Something like

This is great!

…except in the *exact* circumstance I actually need it for:

%%%%  SNIPPET BEGINS
\version "2.19.64"

#(define (moment->string mom)
 (if (zero? (ly:moment-grace mom))
  (number->string (ly:moment-main mom))
  (format "~sG~a" (ly:moment-main mom) (ly:moment-grace mom))))

currentmom =
-\tweak text
#(lambda (grob)
  (let* ((loc (grob::rhythmic-location grob)))
    (if (pair? loc)
         #{ \markup \with-color #red #(format "~a@~a" (car loc)
                                              (moment->string (cdr loc))) #}
        "")))
-""

\layout {
  \context {
    \Score
    \remove "Timing_translator"
    \remove "Default_bar_line_engraver"
  }
  \context {
    \Staff
    \consists "Timing_translator"
    \consists "Default_bar_line_engraver"
  }
}

{ c d\currentmom f g }
%%%%  SNIPPET ENDS

Any way to get the moment of the current context when Timing has been moved 
from Score?

Thanks,
Kieren.
________________________________

Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to