lilypond-devel
[Top][All Lists]
Advanced

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

Re: Nested tuplets, making transparent first number makes also the follo


From: Trevor Bača
Subject: Re: Nested tuplets, making transparent first number makes also the following
Date: Wed, 14 Mar 2007 09:32:54 -0500

On 3/13/07, Graham Percival <address@hidden> wrote:
José Luis Cruz wrote:
> I've seen that the description of the \twek function in the manual is
> very short and it only examples its use for adding color to
> chordnotes. It would be useful to addd a tuplet example too.

http://lilypond.org/web/devel/participating/documentation-adding

Hi Graham,

Would it be helpful to add the following doc snippet to 6.2.3
"Tuplets" in the "Commonly tweaked properties" section? I think it
makes most since immediately after "To avoid printing tuplet numbers,
use ..." and immediately before "Tuplet brackets can be made to run to
prefatory matter or the next note ...".

=== BEGIN DOC ADDITION ===

Use the \tweak function to override nested tuplets beginning at the
same music moment. The special \tweak function is like \override in
that \tweak overrides grob properties. The \tweak function differs
from \override in that \tweak neither specifies a grob name nor
contains an equal sign. Here \tweak specifies fraction text for the
outer TupletNumber and denominator text for the TupletNumber of the
first of the three inner tuplets.

\new Staff {
  \tweak #'text #tuplet-number::calc-fraction-text
  \times 4/3 {
     \tweak #'text #tuplet-number::calc-denominator-text
     \times 2/3 { c'8[ c'8 c'8] }
     \times 2/3 { c'8[ c'8 c'8] }
     \times 2/3 { c'8[ c'8 c'8] }
  }
}

Here \tweak and \override work together to specify TupletBracket
direction. The first \tweak positions the TupletBracket of the outer
tuplet above the staff. The second \tweak positions the TupletBracket
of the first of the three inner tuplets below the staff. Note that
this pair of \tweak functions affects only the outer tuplet and the
first of the three inner tuplets because only those two tuplets begin
at the same music moment. We use \override in the usual way to
position the TupletBrackets of the second and third of the inner
tuplets below the staff.

\new Staff {
  \tweak #'text #tuplet-number::calc-fraction-text
  \tweak #'direction #up
  \times 4/3 {
     \tweak #'direction #down
     \times 2/3 { c'8[ c'8 c'8] }
     \override TupletBracket #'direction = #down
     \times 2/3 { c'8[ c'8 c'8] }
     \times 2/3 { c'8[ c'8 c'8] }
  }
}


=== END DOC ADDITION ===


--
Trevor Bača
address@hidden

reply via email to

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