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: Markus Schneider
Subject: Re: Getting rid of redundant tuplet brackets in combined voices
Date: Thu, 10 Aug 2006 09:25:58 +0200

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).

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?
I did quite a bit of experimenting but to no avail. See example below - this
should now compile in 2.9.14 (I stripped the "addquote" part).

Again, any help is very much appreciated!

Cheers,
Markus

P.S. Minor modifications of this snippet are necessary for 2.9.13 and
earlier regarding the instrument/instrumentName variable change introduced
in 2.9.14.

%%% 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.instrument =
    %   \markup \column { "combined voices print"
    %                     "redundant tuplet brackets" }

    %%% use instrumentName for 2.9.14 and later
    \set Staff.instrumentName =
      \markup \column { "combined voices print"
                        "redundant tuplet brackets" }
    \partcombine
      { \VoiceI  }
      { \VoiceII }

  }

  \new Staff {

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

    %%% use instrumentName for 2.9.14 and later
    \set Staff.instrumentName =
      \markup \column { "voice I only; tuplet brackets"
                        "removed using \override" }

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

  }

  \new Staff {

    % \set Staff.instrument =
    %   \markup \column { "voice II overrides sent to"
    %                     "specific voice context" }

    %%% use instrumentName for 2.9.14 and later
    \set Staff.instrumentName =
      \markup \column { "overrides sent to voice I using"
                        "specific voice \"one\" context"
                        \italic "- doesn't work -" }

    \partcombine
      <<
        \context Voice = "one" { % This removes also all of it
          \override Voice.TupletBracket #'bracket-visibility = ##f
          \override Voice.TupletNumber  #'transparent = ##t }
        \VoiceI
      >>
      { \VoiceII }

  } >>

  \layout {
    indent = 5\cm
    ragged-right = ##t
  }
}
%%% End Snippet







reply via email to

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