[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Additive time signatures
From: |
Mats Bengtsson |
Subject: |
Re: Additive time signatures |
Date: |
Thu, 28 Feb 2008 10:30:13 +0100 |
User-agent: |
Thunderbird 2.0.0.5 (X11/20070716) |
Kurt Kroon wrote:
(I'm not sure if one can extend this last one in LilyPond to more complex
examples, like when the numerator is an additive expression, and the
denominator is a single digit, e.g. (3+2+3)/8.)
I was mistaken ... it *is* possible to extend the syntax (which seems
completely reasonable, in retrospect). I've borrowed (and stretched) the
compound-time-signature snippet as follows:
\version "2.10.33"
#(define (compound-time grob one two three num)
(interpret-markup
(ly:grob-layout grob)
'(((baseline-skip . 2)
(word-space . 2)
(font-family . number)))
(markup
#:line ( #:column (one) "+" #:column (two num) "+" #:column (three)))))
Where did you get inspiration to this solution? The examples I can find in
LSR and the manual, all set stencil to #ly:text-interface::print and make
an appropriate markup which they assign to the text property.
I hope you have seen http://lsr.dsi.unimi.it/LSR/Snippet?id=192
for example. Even though your solution is very elegant if you know
what you're doing, I think the type of solution currently found in
LSR and documentation may be easier to understand and also easier
to generalize to other situations where you want to override the default
layout of a grob.
\relative {
%% compound time signature hack
\time 8/8
\override Staff.TimeSignature #'stencil
= #(lambda (grob) (compound-time grob "3" "2" "3" "8"))
#(override-auto-beam-setting '(end 1 8 8 8) 3 8)
c8 c c f f d d bes g c c f d c f e
}
\layout {
\context {
\Staff
\consists "Measure_grouping_engraver"
}
}
It isn't quite right -- the measure grouping should be 3+2+3, not 3+3+2,
which I attribute to my perfunctory reading of the section on overriding the
auto-beam setting -- but I'm positively gobsmacked at how close it is. If I
manually beamed what I wanted (instead of trying to have LilyPond do it for
me), Lily would do it exactly as I expected it.
Try:
#(override-auto-beam-setting '(end 1 8 8 8) 3 8)
#(override-auto-beam-setting '(end 1 8 8 8) 5 8)
\set Staff.beatGrouping = #'(3 2 3)
Does this qualify to be added to the compound-time snippet?
And if so, am I the one who's supposed to add it?
I think it's a good general idea to let each snippet illustrate one main
concept
and that the overall approach is easier to grasp from the current
compound-time
snippet. Since you already have snippets 261 and 192 in LSR, I'm not
sure about
the added value of your example (possibly you might want to add
auto-beam and
beatGrouping settings in 192).
On the other hand, don't hesitate in general to add new snippets in LSR,
that's the whole point of LSR.
/Mats
- GDP glossary question: complex meters, Kurt Kroon, 2008/02/26
- Re: GDP glossary question: complex meters, Valentin Villenave, 2008/02/26
- RE: GDP glossary question: complex meters, Palmer, Ralph, 2008/02/26
- Re: GDP glossary question: complex meters, Kurt Kroon, 2008/02/27
- Additive time signatures (was: GDP ... complex meters), Kurt Kroon, 2008/02/28
- Re: Additive time signatures (was: GDP ... complex meters), Valentin Villenave, 2008/02/28
- Re: Additive time signatures, Joseph Wakeling, 2008/02/28
- Re: Additive time signatures, Mats Bengtsson, 2008/02/28
- Re: Additive time signatures, Joseph Wakeling, 2008/02/28
- Re: Additive time signatures, Hans Aberg, 2008/02/28
- Re: Additive time signatures, Joseph Wakeling, 2008/02/28
- Re: Additive time signatures, Hans Aberg, 2008/02/28
- Re: Additive time signatures, Rune Zedeler, 2008/02/29