lilypond-user
[Top][All Lists]
Advanced

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

Re: default stem direction


From: Mats Bengtsson
Subject: Re: default stem direction
Date: Wed, 14 May 2003 10:58:26 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

The answer below is basically correct but omits one important fact.
The \\ construct instantiates two separate Voice contexts and
the property setting are only active within the respective context.
So, after the >>, you are back to your original Voice context which
does not know anything about the settings that were done in the
two voices within the <<{} \\ {} >>.

   /Mats

Hans Forbrich wrote:
(Apologies for the length - I'm in computer teacher mode <g>)

Remember that \stemUp, \stemDown and \stemBoth are just macros (in
1.6.6, they are defined in property-init.ly).

stemUp = \property Voice.Stem \set #'Direction = #1
stemBoth = \property Voice.Stem \revert #'Direction

You are likely looking for \stemBoth - but there's a catch

The secret here is in the way the reset works - you may get better hints
if you look at the \override and \set directives.  Basically consider
\set to be an open bracket, \revert to be a closed bracket, anything
between the brackets does the same thing.  #1 (in this case) means 'up'.

Now, the << {} \\ {} >> has an implied \stemUp for the direct {} and an
implied \stemDown for the second {}.  And I believe an implied \stemBoth
at the end of each {} as well.

You can add your own as well, but the \stemBoth might not appear to
reset if you have extra nested ones.  For example, consider

    \stemUp (notes) \stemDown (notes) \stemUp (notes) \stemBoth

The \stemBoth matches to the last \stemUp, resets that and leaves the
result with \stemDown.

So a total reset to get "normal" behaviour would be

     \stemUp (notes)
        \stemDown (notes)
            \stemUp (notes)
            \stemBoth
        \stemBoth
    \stemBoth

    (indent not necessary but very useful)
    or

    \stemUp (notes) \stemBoth
    \stemDown (notes) \stemBoth
    \stemUp (notes) \stemBoth

    or (not recommended) you could define a macro such as

    stemRevert = \property Voice.Stem \set #Direction = #0

Regardless - remember the implied \stemUp with the << {} \\ {} >>

HTH
/Hans

Hortense Landelier wrote:


Hi -- I know I should be able to figure this out
myself but I couldn't find the right documentation --

How do you get the stems (and ties) to behave normally
after using \stemUp or \stemDown?  I'm using
<
{}
\\
{}

to get two voices on a staff and then I want to switch
to chords, some of which are tied together, and I
don't want the ties to all go up or down.  Any
suggestions appreciated.  Thanks!

__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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




_______________________________________________
Lilypond-user mailing list
address@hidden
http://mail.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]