Well, here's the file...

Am 08.05.2014 10:24, schrieb Urs Liska:
Hi,

in my current examination of polymetrics I stumbled over a missing item
in LilyPond: alternating time signatures.

In contemporary notation (well, actually starting quite early in the
20th century, so "contemporary" isn't really adequate) it's a common
concept to write sth like

6 5
8 8

to indicate a section with (irregularly) changing meters.

This can easily be achieved by overriding the TimeSignature stencil, but
as far as I can tell there is no suitable documentation for this.

There _had_ been a snippet to achieve

6   5
   +
8   8

which is a different thing but could easily be adapted. But (I assume)
with the inclusion of \compoundTimeSignature this seems to have been
removed from the docs _and_ the LSR. So you only find the solution in
some really old and therefore dubious list posts.

I think this is common notation and should be better supported.
I see two different solutions that I volunteer to do if I get
appropriate feedback here:

a)
Create a new LSR snippet and tag it with "doc"

b)
Create a new command for LilyPond itself, as a complement to
\compoundTimeSignature and write appropriate documentation.

I prefer solution b) but will only create a patch if I can expect not to
get objections about the usefulness in itself.

See attached file for my initial approach, with a few comments:

- I assume the function could be implemented more efficiently
- I would allow it to accept lists of lists
   (as compoundTimeSignatures) instead of expecting a hardcoded
    number of four arguments.
- I'm not sure if it's right to expect the user to
   write \revert Score.TimeSignature.stencil in the end, or
   if it would be more consistent to add an explicit command
   for that.

naming suggestion: \alternatingTimeSignature

What do you think?

Urs

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


\version "2.19.6"
#(define ((custom-time-signature one two three four) grob)
   ;; derived from
   ;; http://lilypond.1069038.n5.nabble.com/Mixed-Time-Signatures-Non-regular-alternantion-between-5-8-and-8-8-td18617.html
   (grob-interpret-markup grob
     (markup #:override '(baseline-skip . 0) #:number
       (#:line ((#:column (one two))
                (#:column (three four)))))))


alternatingTimeSignatures =
#(define-music-function (parser location timesigs)
   (list?)
   (let* ((newTime (cons
                    (list-ref timesigs 0)
                    (list-ref timesigs 1)))
         (numOne (number->string (list-ref timesigs 0)))
         (denOne (number->string (list-ref timesigs 1)))
         (numTwo (number->string (list-ref timesigs 2)))
         (denTwo (number->string (list-ref timesigs 3))))
     #{
       \override Score.TimeSignature.stencil =
         #(custom-time-signature numOne denOne numTwo denTwo)
       \time #newTime
     #}
     ))

\relative c' {
  \alternatingTimeSignatures #'(3 8 4 8)
  \omit Score.TimeSignature
  c8 d e
  \time 4/8
  f g a b
  \time 3/8
  c g c,
  d e f
  g a b
  \time 4/8
  c b a b
  \revert Score.TimeSignature.stencil
  \time 5/8
  c b a g f
}

\relative c' {
  \override TupletNumber.text = #tuplet-number::calc-fraction-text
  \alternatingTimeSignatures #'(3 4 4 7)
  c4 d e
  \omit Score.TimeSignature
  \time 4/7
  \tupletSpan 4*16/7
  \tuplet 7/4 {
    f e f fis
    g a ais b
  }
  \time 3/4
  c4 g c,
}
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to