I'm reasonably happy with my solution to compound times.  I'm
still wondering about the printing -- should I leave it as
3 + 3 + 2
8   8   8

or change it to something like
8 (3+3+2)
8


Anyway, that's a relatively minor issue.  The attached file prints
compound time signatures and sets up automatic beaming.

Cheers,
- Graham

\version "2.11.62"
\include "compound.ly"

\relative c' {
  \compoundTimeTwo #5 #8 #3 #2
  c8 d16 d e e fis fis gis gis
  \compoundTimeTwo #5 #8 #2 #3
  c,8 d16 d e e fis fis gis gis
  \compoundTimeTwo #5 #4 #2 #3
  c,8 c d d e e f f g g
  \compoundTimeTwo #5 #4 #3 #2
  c,8 c d d e e f f g g

  \compoundTimeThree #8 #8 #3 #3 #2
  a8 a a e' e e c c
  \compoundTimeThree #7 #8 #2 #2 #3
  a a b b cis cis cis

}

\version "2.11.62"

compoundTimeTwo = #(define-music-function (parser layout num denom a b)
  (number? number? number? number?)
  #{
    % graphical display
    \override Staff.TimeSignature #'stencil = #ly:text-interface::print
    \override Staff.TimeSignature #'text = #(markup
       #:override '(baseline-skip . 0)
      (#:number #:line(
         #:column(
           (number->string $a)
           (number->string $denom))
         #:vcenter "+"
         #:column(
           (number->string $b)
           (number->string $denom))
      )))

    % measure length + beaming
    \set Timing.timeSignatureFraction = #(cons $num $denom)
    \set Timing.beatLength = #(ly:make-moment 1 $denom 0 1)
    \set Timing.beatGrouping = #(list $a $b)
    \set Timing.measureLength = #(ly:make-moment $num $denom 0 1)
  #})

compoundTimeThree = #(define-music-function (parser layout num denom a b c)
  (number? number? number? number? number?)
  #{
    % graphical display
    \override Staff.TimeSignature #'stencil = #ly:text-interface::print
    \override Staff.TimeSignature #'text = #(markup
       #:override '(baseline-skip . 0)
      (#:number #:line(
         #:column(
           (number->string $a)
           (number->string $denom))
         #:vcenter "+"
         #:column(
           (number->string $b)
           (number->string $denom))
         #:vcenter "+"
         #:column(
           (number->string $c)
           (number->string $denom))
      )))

    % measure length + beaming
    \set Timing.timeSignatureFraction = #(cons $num $denom)
    \set Timing.beatLength = #(ly:make-moment 1 $denom 0 1)
    \set Timing.beatGrouping = #(list $a $b $c)
    \set Timing.measureLength = #(ly:make-moment $num $denom 0 1)
  #})


_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to