lilypond-user
[Top][All Lists]
Advanced

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

Re: vanishing slur ? note with two stems ?


From: Mats Bengtsson
Subject: Re: vanishing slur ? note with two stems ?
Date: Wed, 11 Feb 2004 13:55:11 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113



address@hidden wrote:
Please excuse my ignorance: I am still at the very beginning with Lilypond. Perhaps someone can help with these two questions:

1. How can you produce a note with two stems, one running up and the other running down obviuosly?. \stemBoth does not seem to do the job. I have looked through the manuals and I have been unable to find the solution. I guess it must be fairly easy.

If you want two simultaneous notes with stems ponting i opposite
directions, you have to put them into separate Voices (as is done
by the << ... \\ ... >> construct). This can be used also to solve
your problem if you have the same note in both voices.
Example: << g4 \\ g >>


2. The following code produce the desired slur (see enclosed file visible-slur.pdf) between the d in the first bar and the chord in the second.


        \include "paper23.ly"

        \paper  {
         linewidth = 455.244096\pt
                        }
        \version "2.0.1"

        \score {
                 \notes
                 \new Staff {
                 \time 3/4
                 \clef bass

        \relative c  {

%  a2( d4)

\simultaneous { { s4 \phrasingSlurUp d2\( } \\ { \stemBoth g,4 r4 \stemDown d_5 }}

        \stemUp < d' g, >4\)_2  \stemDown g8_1( f! e d)
                    }
                 }
          \paper { }
        }


However, if I un-comment the line %a2( d4) just below \relative c, thus introducing a new bar at the beginning, the slur disappears (see enclosed file vanishing-slur.pdf) and the log file says:

Interpreting music..

/cygdrive/g/Lilypond/question.ly:24:19: warning: can't find start of phrasing 
slur:

\stemUp < d' g, >4\

                  )_2  \stemDown g8_1( f! e d)



/cygdrive/g/Lilypond/question.ly:22:40: warning: unterminated phrasing slur:

\simultaneous { { s4 \phrasingSlurUp d2\

                                       ( }  \\ { \stemBoth g,4  r4 \stemDown 
d_5 }}


Can anybody give me an explanation ?. I have found that the work around is to include the last two bars in the same piece of simutaneous code:

\simultaneous { { s4 \phrasingSlurUp d2\( \stemUp d4\) s2 } \\ { \stemBoth g,4 r4 \stemDown d_5 \stemUp g4_2 \stemDown
\slurUp \once   \property Voice.Slur \set #'attachment = #'(head . head) g'8_1( 
f! e d)} }


but I would like to understand why it is happening.

Again, it's a matter of Voice contexts. Since a slur belongs to a
particular voice in the music, both ends of the slur have to appear
in the same Voice context in LilyPond.

However, I have some comments on your example:
- It seems to me that the slur from d2 to d should not be a slur but a
  tie (i.e. the note is tied over). In that case, you should notate it
  like that: d2 ~ d4 .
- Doesn't the g at the first beat of the second bar musically belong
  to the same voice as the d in the first bar? In that case, I would
  keep it in that Voice context and notate it stem down.
- Once you let the Voice contexts reflect the musical structure, I'm
  sure you can get rid of almost all the \stemUp \stemDown \stemBoth
  directives, since LilyPond knows lots about standard typesetting
  practice and will mostly do the "right thing".
  This is a general idea of LilyPond, that the input should primarily
  reflect the music itself, not how it's notated.

I changed your example into
\relative c  {
  g4 << { d'2 ~ | d4 }  \\ { r4 d,_5 | g }>>
  g'8_1( f! e ) d |
}
which makes more sense to me, musically, and lets LilyPond do the
typesetting decisions.

3. I would also be very grateful for a short tutorial on how to control slurs, specially tweaking with offsets at the tips.

Again, LilyPond often makes a good decision. I suggest that you come
back to the list with specific examples where you think the default
is wrong. This could help improve future versions of LilyPond even more.

   /Mats




reply via email to

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