lilypond-user
[Top][All Lists]
Advanced

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

Re: Getting rid of redundant tuplet brackets in combined voices


From: Henrik Frisk
Subject: Re: Getting rid of redundant tuplet brackets in combined voices
Date: Thu, 10 Aug 2006 19:30:29 +0200

Markus Schneider <address@hidden> wrote:

> Hi Henrik,
> 
> > However, I would imagine you could put a
> >
> > \override Voice.TupletBracket  #'bracket-visibility = ##t
> > \override Voice.TupletNumber #'transparent = ##t
> 
> if I pass this to the first voice, all brackets and numbers vanish; passed
> to the second voice, nothing happens at all (ie still double
> brackets/numbers).
> 
This is odd. Your file does exactly what I thought was what you
wanted. As a matter of fact, I can't even force it to show the tuplet
brackets of voice two unless I display it by itself. I don't get the
redundant brackets (OSX 2.9.14).

> The fine manual states in "8.3.1 Automatic part combining" that the voice
> contexts inside \partcombine are referred to "one" and "two". Is it possible
> to send these overrides to only one of these contexts?

That's what you do in your file below. You do the override within the
voice that you want to affect. That override will not have an effect in
the other Voice, which has its own context. 

In the modified file below Staff 1 and 3 produces the same output, staff
2 has no brackets.

%%% Begin snippet
\version "2.9.14"

%%% if using 2.9.13 or earlier, modify the instrument/instrumentName variables
%%% below accordingly!

tupletsI = \relative c' {
  | \times 2/3 { c4 d e f g a }
}

tupletsII = \relative c'' {
  | \times 2/3 { b4  c d e f g }
}

% Top voice
VoiceI = {
  \tupletsI
  \tupletsII
}

% Bottom voice
VoiceII = {
  \tupletsI
  \tupletsI
}

\score { <<
  \set Score.tupletSpannerDuration = #(ly:make-moment 1 2)

  \new Staff {
    \set Staff.instrumentName =
      \markup \column { "combined voices print"
                        "redundant tuplet brackets" }

    \partcombine
      { \VoiceI  }
      { \VoiceII }

  }

  \new Staff {
    \set Staff.instrumentName =
      \markup \column { "voice I only; tuplet brackets"
                        "removed using \override" }

    \override Staff.TupletBracket #'bracket-visibility = ##f
    \override Staff.TupletNumber  #'transparent = ##t
    \VoiceI
  }

  \new Staff {

    \set Staff.instrumentName =
      \markup \column { "overrides sent to voice I using"
                        "specific voice \"one\" context"
                        \italic "- does work :-)" }
    \partcombine
      <<
        \context Voice = "one" {
          \VoiceI
        }
      >>
    { 
      \override Voice.TupletBracket #'bracket-visibility = ##t
      \override Voice.TupletNumber  #'transparent = ##f
      \VoiceII }
    
  } >>
         
         \layout {
           indent = 5\cm
           ragged-right = ##t
  }
}
%%% End Snippet




reply via email to

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