lilypond-devel
[Top][All Lists]
Advanced

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

Fw: music function


From: Trevor Daniels
Subject: Fw: music function
Date: Wed, 17 Nov 2010 09:41:19 -0000

This is the second time this has come up recently.
Sounds like a good candidate for an enhancement request.

Trevor

----- Original Message ----- From: "jakob lund" <address@hidden>
To: <address@hidden>
Sent: Wednesday, November 17, 2010 9:22 AM
Subject: music function


Hi


I have two questions that I hope someone here can answer.
I have something like this

\repeat volta 4 { ... music ... }

There are no alternative endings, so the number 4 doesn't show up in the output.
I would like the text "×4" to appear below the closing repeat mark
(dotted bar line). Is there already a way
to do that? (there ought to be but I can't seem to find it...)

Using \mark is no good, because I already have a mark on that bar
line. Thus far I came up with:

repeatTimes = #(define-music-function (parser location r) (integer?)
   #{
       \bar ""
       \once \override Score.TimeSignature #'stencil = ##f
       \time 1/32
       s32-\markup{\concat{ $(markup (number->string r)) "×" } }
       \once \override Score.TimeSignature #'stencil = ##f
       \time 4/4
   #})

(the technique is adapted from the snippet titled "Creating
simultaneous rehearsal marks"
from the lilypond documentation.) So now I write

\repeat volta 4 { ... music ... \repeatTimes #4 }

which gives sort of the desired result. My second question is: Can I,
perhaps using the 'parser' argument, access
   (a) the `current time signature' (so I can get rid of the
hard-coded 4/4 at the end) and
(b) the argument to `\repeat volta' (so I won't have to supply the
argument #4, which is redundant 'cause I already put `volta 4') ?


Regards
Jakob Lund.

_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user






reply via email to

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