lilypond-user
[Top][All Lists]
Advanced

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

Find out denominator of current time signature


From: Thomas Weber
Subject: Find out denominator of current time signature
Date: Wed, 11 Jan 2017 14:00:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Dear all,

I wonder how I can create a duration that is so to say exactly one time 
signature denominator long (e.g. an eigth in 6/8, a quarter in 4/4 etc.).  I 
thought something like this would work:

      #(make-music
          'SkipEvent
          'duration
          (ly:make-duration 0 0 1 (ly:moment-main-denominator ???))
          'articulations
          (list (make-music
                  'AbsoluteDynamicEvent
                  'text
                  "ff")))

Lacking experience, I don't know whether ly:moment-main-denominator is the 
thing to go for here and if so, what argument to supply.

The background is automatic generation of Lilypond input code where it is 
non-trivial to find out the time signature for the code generator, so I hoped 
it would be possible to write out some Scheme code that will defer that task to 
Lilypond.

Many thanks
Thomas




reply via email to

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