On 12/27/08 2:52 PM, "Johan Vromans" <jvrom...@squirrel.nl> wrote:

> "Carl D. Sorensen" <c_soren...@byu.edu> writes:
> 
>> intro = <<
>>   \context Staff = "StaffOne" {
>>     \context Voice = "VoiceOne" {
>>       c''4 c''
>>     }
>>   }
>>   \context Staff = "StaffTwo" {
>>     \context Voice = "VoiceTwo" {
>>       c'4 c'
>>     }
>>   }
>>>> 
>> 
>> verseOne = <<
>>   \context Staff = "StaffOne" {
>> [...]
> 
> Yes, this is what I referred to as "a cumbersome task" :(


OK, so automate it with a music function:

parallelStaffs = #(define-music-function (parser location firstStaff
secondStaff)
                      (ly:music? ly:music?)
#{ <<
     \context Staff = "StaffOne"  {
       \context Voice = "VoiceOne" {
         $firstStaff
       }
     }
     \context Staff = "StaffTwo" {
       \context Voice = "VoiceTwo" {
         $secondStaff
       }
     }
  >> 
#})

intro = \parallelStaffs
  {c''4 c''} 
  {c'4 c'}

verseOne = \parallelStaffs
  {d''4 d''}
  {d'4 d'}

chorus = \parallelStaffs
  {e''4 d'' }
  {e'4 e'}

verseTwo = \parallelStaffs
  {f''4 f''}
  {f'4 f'}

\score {
  {
    \intro
    \verseOne
    \chorus
    \verseTwo
  } 
} 
 


Carl



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

Reply via email to