-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I'm currently trying to implement general compound time signatures like (1+2+3+4)/8 + 2/4 + (2+3)/8 as \compoundMeter #'((1 2 3 4 8) (2 4) (2 3 8))
Now, in my first step, I'm implementing the display of (1+2+3)/8 fractions. My only problem with this is that with the methods shown in the LSR snippets the 8 is always left-aligned and not centered between the 1+2+3. How can I do this? Attached is a simple stripped-down example of my current time sig text function. Setting the correct measure length and the auto-beaming is of course yet to come, currently I'm only concerned with the correct display of the fraction. Thanks, Reinhold - -- - ------------------------------------------------------------------ Reinhold Kainhofer, Vienna University of Technology, Austria email: [EMAIL PROTECTED], http://reinhold.kainhofer.com/ * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/ * K Desktop Environment, http://www.kde.org, KOrganizer maintainer * Chorvereinigung "Jung-Wien", http://www.jung-wien.at/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQFJMdM7TqjEwhXvPN0RAhgZAJ9236GE6TGJhokHSRWAAeGbPZPBmQCfUOcu PplHRbq/vMQwsJlNaVsZfbE= =K/B/ -----END PGP SIGNATURE-----
\version "2.11.65"
#(define-public (format-time-fraction time-sig-fraction)
(let* ((revargs (reverse time-sig-fraction))
(den (car revargs))
(nums (cdr revargs)))
(make-override-markup '(baseline-skip . 0)
(make-number-markup
(make-column-markup (list
(make-line-markup
(let create-nmarkups ((nmarkups (list (car nums)))
(remaining (cdr nums)))
(if (pair? remaining)
(create-nmarkups (cons (car remaining) (cons "+" nmarkups))
(cdr remaining))
nmarkups)))
den))))))
compoundMeter =
#(define-music-function (parser location args) (pair?)
#{
\override Staff.TimeSignature #'stencil = #ly:text-interface::print
\override Staff.TimeSignature #'text = #(format-time-fraction (map number->string $args))
#} )
{
\compoundMeter #'(1 2 3 4 8)
\repeat unfold 10 c'8 \repeat unfold 20 c'16
}
compound-time-signature.pdf
Description: Adobe PDF document
_______________________________________________ lilypond-user mailing list [email protected] http://lists.gnu.org/mailman/listinfo/lilypond-user
