lilypond-user
[Top][All Lists]
Advanced

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

Re: Temporarily combine two Voices on the same Staff


From: Thomas Morley
Subject: Re: Temporarily combine two Voices on the same Staff
Date: Wed, 21 Dec 2016 23:52:02 +0100

2016-12-21 19:08 GMT+01:00 H. S. Teoh <address@hidden>:
> On Tue, Dec 20, 2016 at 11:30:51PM +0100, Simon Albrecht wrote:
>> On 20.12.2016 22:54, H. S. Teoh wrote:
>> > I'm typesetting some complex polyphonic music, and have 3 Voices
>> > sharing the same Staff. In the middle of the bar, the top two Voices
>> > share the same rhythm, so I'd like to combine stems beams on them
>> > just for 2 beats, and have them be treated independently again
>> > afterwards. There is a 3rd Voice on the same Staff with downward
>> > Beams, so without combining, the top two Voices would have
>> > hard-to-read clashing beams.
>>
>> Please give an example, else it’s hard to judge. But it would be very
>> unusual in an otherwise strictly polyphonic work to use chords for
>> just two beats.
> [...]
>
> Sorry, I didn't make it clear.  I was actually transcribing a Bach
> piece, BWV 850 (fugue in D major in 4 voices, WTC book 1). I chose to
> transcribe it using 4 Voices (there are several Staff crossings
> throughout the piece, so this way I can use \change Staff="...", but
> that's not pertinent here.) In measure 7, for example, I have:
>
>         \include "english.ly"
>         voiceA = \relative c'' {
>                 % m.7
>                 \voiceOne
>                 | g'=''4  fs8. e16  d8. e16  c8. c16
>         }
>
>         voiceB = \relative c'' {
>                 % m.7
>                 \voiceThree
>                 | cs=''8~ cs32 e d cs  d8. cs16  b4  e,4
>         }
>
>         voiceC = \relative c'' {
>                 % m.7
>                 \voiceFour
>                 | a='4  a8. g16  fs8. g16  a4
>         }
>
>         voiceD = \relative c, {
>                 % m.7
>                 \oneVoice
>                 | r4  d32 e fs g fs e fs d  b'8. b16  a8. g16
>         }
>
>         \new PianoStaff <<
>                 \new Staff {
>                         \clef treble
>                         <<
>                                 \new Voice \voiceA
>                                 \new Voice \voiceB
>                                 \new Voice \voiceC
>                         >>
>                 }
>                 \new Staff {
>                         \clef bass
>                         \new Voice \voiceD
>                 }
>         >>
>
> The edition I'm using as reference has, in this bar, the first 3 voices
> on the upper staff, and the bass on the lower staff.  In beat 2 in the
> Lilypond output, voiceA and voiceB have stems and beams that clash with
> each other, because there simply isn't enough space to fit everything in
> otherwise.  Whereas in the edition, in this beat voiceA and voiceB are
> collapsed into 2-note chords so that they can share the same beam, thus
> making it easier to read, even though they are still logically two
> separate voices. In beats 3 and 4, because voiceA and voiceB are no
> longer co-rhythmic, they are typeset the same way Lilypond does it.
>
> So my question was, is it possible to tell Lilypond to merge the two
> voices into chords just for beat 2? Or do I just have to "hack" it by
> using spacers in voiceB and spelling out the chords in voiceA?



Probably (see inline comments):

        \include "english.ly"
        voiceA = \relative c'' {
                % m.7
                \voiceOne
                | g'=''4  fs8. e16  d8. e16  c8. c16
        }

        voiceB = \relative c'' {
                % m.7
                \voiceThree
                | cs=''8~ cs32 e d cs
                %% send this notes to Voice-"A"-context, to
                %% create simultaneous music
                \context Voice = "A" { d8. cs16 }
                b4  e,4
        }

        voiceC = \relative c'' {
                % m.7
                \voiceFour
                | a='4  a8. g16  fs8. g16  a4
        }

        voiceD = \relative c, {
                % m.7
                \oneVoice
                | r4  d32 e fs g fs e fs d  b'8. b16  a8. g16
        }

        \new PianoStaff <<
                \new Staff {
                        \clef treble
                        <<
                                %% n.b.
                                %% named Voices
                                \new Voice = "A" \voiceA
                                \new Voice = "B" \voiceB
                                \new Voice \voiceC
                        >>
                }
                \new Staff {
                        \clef bass
                        \new Voice \voiceD
                }
        >>

HTH,
  Harm



reply via email to

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