Am So., 30. Dez. 2018 um 11:06 Uhr schrieb Thomas Morley
<thomasmorle...@gmail.com>:
>
> Hi,
>
> out of https://lists.gnu.org/archive/html/lilypond-devel/2018-12/msg00178.html
>
> The doc-tagged LSR-snippet "Two \partcombine pairs on one staff"
> http://lsr.di.unimi.it/LSR/Item?id=958
> is obviously inspired by
> https://sourceforge.net/p/testlilyissues/issues/1321/?page=1&limit=25#a054
>
> While it works with 2.18.2 as described, without error/warning, it does not 
> with 2.19.82 and recent master.
> http://lilypond.org/doc/v2.19/Documentation/snippets/simultaneous-notes#simultaneous-notes-two-_005cpartcombine-pairs-on-one-staff
> Lots of warnings and the pdf is not as wished.
>
> Not sure how to fix.
> Thoughts?
>
>
> Cheers,
>   Harm

Attached a possible fix. Works with 2.18., 2.19.82 and (after
convert-ly, i.e. partcombine->partCombine) with recent master.
If no objections, I'll change the LSR-snippet. It will then be
available in our docs after next LSR-import.


Cheers,
  Harm
\layout {
  \context {
    \Staff
    \accepts "VoiceBox"
  }
  \context {
    \name "VoiceBox"
    \type "Engraver_group"
    \defaultchild "Voice"
    \accepts "Voice"
    \accepts "NullVoice"
  }
}

partcombineUplsr =
#(define-music-function (p l partOne partTwo)
  (ly:music? ly:music?)
"Take the music in @var{partOne} and @var{partTwo} and return
a @code{VoiceBox} named @q{Up} containing @code{Voice}s
that contain @var{partOne} and @var{partTwo} merged into one
voice where feasible.  This variant sets the default voicing
in the output to use upward stems."
#{
  \new VoiceBox = "Up" <<
    \context Voice = "one" { \voiceOne }
    \context Voice = "two" { \voiceThree }
    \context Voice = "shared" { \voiceOne }
    \context Voice = "solo" { \voiceOne }
    \context NullVoice = "null" {}
    \partcombine #partOne #partTwo
  >>
#})

partcombineDownlsr = #
(define-music-function (p l partOne partTwo)
  (ly:music? ly:music?)
"Take the music in @var{partOne} and @var{partTwo} and return
a @code{VoiceBox} named @q{Down} containing @code{Voice}s
that contain @var{partOne} and @var{partTwo} merged into one
voice where feasible.  This variant sets the default voicing
in the output to use downward stems."
#{
  \new VoiceBox = "Down" <<
    \set VoiceBox.soloText = #"Solo III"
    \set VoiceBox.soloIIText = #"Solo IV"
    \context Voice ="one" { \voiceFour }
    \context Voice ="two" { \voiceTwo }
    \context Voice ="shared" { \voiceFour }
    \context Voice ="solo" { \voiceFour }
    \context NullVoice = "null" {}
    \partcombine #partOne #partTwo 
  >>
#})

soprano = { d'4 | cis'  b  e'  d'8 cis' | cis'2 b }
alto = { fis4 | e8 fis gis ais b4 b | b ais fis2 }
tenor = { a8 b | cis' dis' e'4 b8 cis' d'4 | gis cis' dis'2 }
bass = { fis8 gis | a4 gis g fis | eis fis b,2 }

\new Staff <<
  \key b\minor
  \clef alto
  \partial 4
  \transpose b b'
  \partcombineUplsr \soprano \alto
  \partcombineDownlsr \tenor \bass
>>
_______________________________________________
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to