Dear all,
(PNG illustration attached)
Given two music variables, "sopone" and "soptwo", would you show me how to get 
an output like "desired 1" or "desired 2" ?
I want to combine the to music expressions, having same noteheads merged, and 
use the resulted combination as a \voiceOne (all stems up, so I can put another 
"alto" part as \voiceTwo).
Regards,
Germain

%% "test-merge-noteheads.ly"

\version "2.11.49"

#(set-global-staff-size 15) 

sopone = { c''1 c''2 g'8 a' b' c'' e'' f'' g'' e'' }
soptwo = { c''1 c''2 g'8 f' g' c'' e'' d'' c'' e'' }
\markuplines {
"Dear all,"
"Given \"sopone\" and \"soptwo\" (variables),"
"how to get \"desired 1\" or \"desired 2\" ?"
}
\score
{
\new GrandStaff
<<
 \new ChoirStaff
 <<
  \new Staff
  <<
   \set Staff.instrumentName = "sopone"
   \new Voice << \sopone >>
  >>
  \new Staff
  <<
   \set Staff.instrumentName = "soptwo"
   \new Voice << \soptwo >>
  >>
 >>
 \new ChoirStaff
 <<
  \new Staff
  <<
   \set Staff.instrumentName = "desired 1"
   \new Voice { \voiceOne  <c'' c''>1 c''2 g'8 <a' f'> <b' g'> c'' e'' <f'' 
d''> <g'' c''> e'' }
  >>
 >>
 \new ChoirStaff
 <<
  \new Staff
  <<
   \set Staff.instrumentName = "desired 2"
   \new Voice { \voiceOne  c''1 c''2 g'8 <a' f'> <b' g'> c'' e'' <f'' d''> <g'' 
c''> e'' }
  >>
 >>
 \new ChoirStaff
 <<
  \new Staff
  <<
   \set Staff.instrumentName = "got 1"
   \new Voice << \sopone \soptwo >>
  >>
  \new Staff
  <<
   \set Staff.instrumentName = "got 1 bis"
   \new Voice << \voiceOne \sopone \soptwo >>
  >>
  \new Staff
  <<
   \set Staff.instrumentName = "got 2"
   \set Staff.printPartCombineTexts = ##f
   \new Voice << \partcombine \sopone \soptwo >>
  >>
  \new Staff
  <<
   \set Staff.instrumentName = "got 2 bis"
   \set Staff.printPartCombineTexts = ##f
   \new Voice << \voiceOne { \partcombine \sopone \soptwo} >>
  >>
  \new Staff
  <<
   \set Staff.instrumentName = "got 3"
   \new Voice { \voiceOne \sopone }
   \new Voice { \voiceTwo \soptwo }
  >>
  \new Staff
  <<
   \set Staff.instrumentName = "got 4"
   \new Voice { \voiceOne \sopone }
   \new Voice { \voiceThree \shiftOff \soptwo }
  >>
 >>
>>
\layout {}
}

<<attachment: test-merge-noteheads2.png>>

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to