On Mon, Oct 20, 2008 at 03:18:17PM +0200, Joseph Wakeling wrote:
> Graham Percival wrote:
> > I am pleased to re-announce that I am an idiot. Please ignore the
> > previous message about "elegant" compound time signatures; the
> > attached file is *much* better.
>
> I'm afraid I get horrible horrible errors with the files you attached
> :-( The resulting output has no time signatures engraved at all.
Mao, I added the comments just before sending the file, and forgot
that scheme used a different symbol for comments.
The attached file fixes this.
Cheers,
- Graham
\version "2.11.62"
compoundTimeSignature = #(define-music-function
(parser layout timesig compound) (list? list?)
#{
% graphical display
\once \override Staff.TimeSignature #'Y-offset = #3
\once \override Staff.TimeSignature #'stencil = #ly:text-interface::print
\once \override Staff.TimeSignature #'text = #(markup
;; parenthetical display of compound-ness
#:column(
#:small #:line(
#:concat ( "("
;; list the additive portions of the time signature,
;; adding "+" between items.
(make-line-markup (list-insert-separator
(map (lambda (n)
(markup (number->string n)))
$compound)
(markup "+")))
")"
))
#:override '(baseline-skip . 0)
;; main time signature display
(#:number #:line(
#:column(
(number->string (car $timesig))
(number->string (cadr $timesig)))
))))
% measure length + beaming
\set Timing.timeSignatureFraction = #(cons (car $timesig) (cadr $timesig))
\set Timing.beatLength = #(ly:make-moment 1 (cadr $timesig) 0 1)
\set Timing.beatGrouping = $compound
\set Timing.measureLength = #(ly:make-moment (car $timesig) (cadr $timesig)
0 1)
#})
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user