lilypond-user
[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: Mon, 12 Mar 2007 17:52:07 -0500

On 3/12/07, José Luis Cruz <address@hidden> wrote:

Hello,

I'm working on a guitar piece and I've encountered a problem. I hope anyone has
a clue of the solution, or maybe I've found a bug.


In this measure I'm using 2 voices, I want to use a tuplet for the first 3
quarter notes of the measure. On the first voice there are 4 triplets while
while in the second are 4 quarter notes.

Ok but if I leave this untouched there will be 2 tuplet brackets with the 4
number, one for each voice, up and down. So I pretend to hide the one on the
first voice.

The problem comes when I add this line:
\once \override TupletNumber #'transparent = ##t
It hides the number I want, but also the first triplet's number. And I'm unable
to ONLY make transparent the number of the 3/4 tuplet. Any clues?

Here's the isolated example: (it gives some warnings -don't know why-, but
compiles ok).


\version "2.11.20"

\Music = {
        <<
        {
        \once \override TupletNumber #'transparent = ##t
        \once \override TupletBracket #'transparent = ##t
        \times 3/4 {
                \times 2/3 {ees'8[ f' g']}
                \times 2/3 {ees'[ f' g']}
                \times 2/3 {ees'[ f' g']}
                \times 2/3 {ees'[ f' g']} }
                b'4\rest |
        }

\\

        {
        \times 3/4 {ees'4 ees' ees' ees'} aes
        }
        >>
}

\score {\new Staff \Music}

Hi José,

Nested tuplets start at the same moment. To override musical
constructs beginning at the same moment in the same voice, there's a
handy \tweak function. \tweak is useful primarily for overriding
attributes of individual notes in a chord and also for setting
overriding nested tuplets separately.

Here's your example with \tweak:

%%% BEGIN %%%

\version "2.11.20"

Music = {
      <<
      {
      \tweak #'transparent ##t
      \times 3/4 {
              \times 2/3 {ees'8[ f' g']}
              \times 2/3 {ees'[ f' g']}
              \times 2/3 {ees'[ f' g']}
              \times 2/3 {ees'[ f' g']} }
              b'4\rest |
      }

\\

      {
      \times 3/4 {ees'4 ees' ees' ees'} aes
      }
      >>
}


\score {\new Staff \Music}

%%% END %%%


Another good way to look at \tweak is as overriding things "connected
directly to input".

Also, you were getting that one warning because you had

 \Music

prior to defining Music as a variable. To fix this and remove the
warning, simply remove the slash at the *definition* of the Music
variable (but make sure to keep the slash later on when you
*reference* your Music variable).

See also http://lists.gnu.org/archive/html/lilypond-user/2007-01/msg00496.html
for another example of \tweaking nested tuplets.


--
Trevor Bača
address@hidden

reply via email to

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