Mats Bengtsson <mats.bengtsson <at> ee.kth.se> writes:

> 
> Possibly, \partcombine can handle this, otherwise I'm afraid
> the best solution is to implement a music function in Scheme
> that goes through the music and adds \voiceOne and \oneVoice
> at the appropriate places.
> 
> At second thought, I guess you generate the .ly file from your
> program, so what you really want is to be able to specify
> \voiceOne / \oneVoice for the upper Voice context while
> generating the .ly code for the lower Voice. In that case, one
> possible solution would be to define your own macros that do
> the same as \voiceOne and \oneVoice but do the settings at the
> Staff context level instead of Voice level. Then, for the lower voice,
> you can still use \voiceTwo, since settings at the Voice level will
> override those from the Staff level. Then you can generate code like
> lower_voice = {\voiceTwo some music \oneVoiceInStaff s1*5
> \twoVoicesInStaff more music ...}
> 
>    /Mats
> 


Thanks, Mats.

That's exactly what I have done yesterday.
Now, the script generates the voices as before, except:
1) Voice 2 has always \voiceTwo command in the beginning.
2) Voice 1 has \voiceOne when some music appears in voice 2, and \oneVoice
command is generated whenever voice 2 disappears (i.e. has s1 rests).

This works fine.

(Now I do not understand the rest of your message: why do I need
"\oneVoiceInStaff" in the second voice?)






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

Reply via email to