[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: printing the current moment in a context
From: |
Kieren MacMillan |
Subject: |
Re: printing the current moment in a context |
Date: |
Wed, 16 Aug 2017 07:51:06 -0400 |
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 "address@hidden" (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: address@hidden
- printing the current moment in a context, Kieren MacMillan, 2017/08/16
- Re: printing the current moment in a context, David Kastrup, 2017/08/16
- Re: printing the current moment in a context,
Kieren MacMillan <=
- Re: printing the current moment in a context, David Kastrup, 2017/08/16
- Re: printing the current moment in a context, Francisco Vila, 2017/08/16
- Re: printing the current moment in a context, David Kastrup, 2017/08/16
- Re: printing the current moment in a context, Kieren MacMillan, 2017/08/17
- Re: printing the current moment in a context, Jan-Peter Voigt, 2017/08/18
- Re: printing the current moment in a context, David Kastrup, 2017/08/18
- Re: printing the current moment in a context, Jan-Peter Voigt, 2017/08/18
- Re: printing the current moment in a context, Kieren MacMillan, 2017/08/18
- Re: printing the current moment in a context, Kieren MacMillan, 2017/08/18
- Re: printing the current moment in a context, David Kastrup, 2017/08/16