lilypond-user
[Top][All Lists]
Advanced

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

Re: Nested tuplets


From: Trevor Bača
Subject: Re: Nested tuplets
Date: Sun, 21 Jan 2007 09:10:37 -0600

On 1/21/07, Vivian Barty-Taylor <address@hidden> wrote:

I'm using 2.10.12

I'm trying to get nested tuplets going in opposite directions, so to speak.
What I would like is something like:

\tupletUp \times 2/3 { \tupletDown \times 4/5 { g16 a b c d} r8 }

but this doesn't seem to work. At the moment both tuplet-brackets go in the
same direction and collide. I've searched the archives of this list and this
is mentioned as something that used to work automatically. Has this not been
fixed yet?

Hi Vivian,

Prior to the 2.9.x series of development releases, there was only one
way to override nested tuplets, with \override, like everything else.
This works fine *so long as your nested tuplets do NOT begin at the
same time*.

In 2.9.x the ability to override nested tuplets beginning *at the same
moment* showed up. The 2.10 NEWS file shows, for example, fraction
text on an outer tuplet and denominator text on an inner tuplet. To
override nested tuplets beginning at the same time you can't use
\override and instead need the \tweak function.

So to recap:

Nested tuplet override method #1: to override nested tuplets *NOT
beginning at the same moment* you can use \override like always.
[Implemented a long time ago; nothing unusual here.]

Nested tuplet override method #2: to override nested tuplets
*beginning at the same moment* you  need the \tweak function.
[Implemented relatively recently; provides special new functionality.]

Here's the example for the 2.10 NEWS file with TupletBracket direction
overrides added in for two of the three inner tuplets. The leftmost
tuplet requires \tweak because of coicidence with the startpoint of
the outer tuplet. The rightmost tuplet requires only \override.

%%% BEGIN %%%

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

%%% END %%%

Hope this helps.


--
Trevor Bača
address@hidden

reply via email to

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