lilypond-user
[Top][All Lists]
Advanced

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

Re: Back to the drawing board (Sib->Ly)! And question about voices


From: Mats Bengtsson
Subject: Re: Back to the drawing board (Sib->Ly)! And question about voices
Date: Sun, 15 Oct 2006 07:57:35 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1

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

Kirill wrote:

Ok, gentlemen. Summer is over, back to the drawing board (for those who still
remember, the Sibelius->LyliPond plugin is in works).

The following question might seem a bit unusual, but I'll ask anyway.

Suppose I have a Staff, and two explicitly instantiated Voices in this Staff.
These voices are marked \voiceOne and \voiceTwo, which, in particular, controls
the stem directions. Both voices span for the whole duration of the music,
regardless of whether one of them is actually necessary or not. When there is no
music in one of the voices -- it is padded with hidden rests (like s1*1/2).

Now, the question. Is there a way to make LilyPond automatically choose the
correct stem directions in the first voice based on whether there is something
in the second? For example: imagine a bar where voice 1 has some music, voice 2
is not being used (but exists) and is padded with "s1*...". I want the stems and
everything to behave like there is no voice 2 in this bar. Is it possible?






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


--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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