11.01.2017 um 18:46 schrieb Malte Meyn:
You can get the duration from the context property timeSignatureFraction
or baseMoment:
%%%%%
\version "2.19.53"
{
\time 12/8
\applyContext
#(lambda (context)
(display (ly:context-property
context
'baseMoment)))
%'timeSignatureFraction)))
}
%%%%%
I don’t know how you can make a music function that uses this and
returns music. \applyContext #(lambda (context) (make-music …)) has no
visible output. But maybe it’s a start.
That's definitely going into the right direction - many thanks. I tried this:
\new Staff <<
{
c'4 d'4 e'4 f'4
}
{
\applyContext
#(lambda (context)
(make-music
'SkipEvent
'articulations
(list (make-music
'AbsoluteDynamicEvent
'text
"ff"))
'duration
(ly:make-duration 0 0 1 (cdr (ly:context-property
context
'timeSignatureFraction)))))
}
>>
which is apparently valid, but the created skip event is not inserted into the
music (which your reply already suggested). I guess the problem boils down to
how to get hold of the context without \applyContext.
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user