[Top][All Lists]

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

Re: sprechgesang

From: Maximilian Albert
Subject: Re: sprechgesang
Date: Fri, 26 Jan 2007 00:20:16 +0100
User-agent: IceDove (X11/20061220)

Bertalan Fodor wrote:

> This is good only for stem ups.

You can even unify the functions by directly accessing the stem's
direction property like this:

-- begin code --
sp = { \override Voice.Stem #'stencil =
         #(lambda (grob)
             (ly:stem::print grob) 1 (ly:grob-property grob 'direction)
             (ly:text-interface::print grob) -3 0))
       \override Voice.Stem #'text = \markup {
             \hspace #-1.075 \teeny \musicglyph #"noteheads.s2cross"
-- end code

This spares you from inserting \spUp or \spDown each time the direction
of the stem changes. Also, using \autoBeamOff is more efficient than
manually forbidding the beam for each affected note. IMO the rest of the
code looks much cleaner now:

-- begin code --
\relative c'' {
   \time 2/4
   \partial 8 \sp a8 | \stemUp b8 ais gis a | \time 3/4
                       \stemDown c! \stemUp b! gis
\addlyrics { Den Wein, den man mit Au -- gen trinkt }

\layout {
   ragged-right = ##t
-- end code --

However, I'm truly puzzled by the fact that the crosses are also
attached to rests because we explicitly override the stencil property of
_Stem_. It would be news to me that rests also possess stems. Does any
of the code gurus have an explanation? Or is it really a bug?

BTW, with downward stems the natural sign overlaps with the stem's
cross. Is there a way (other than manually moving the note) to make
lilypond automatically take this into account (e.g., by adding
appropriate code into the above function)? Why is it not handled by
automatic collision avoidance?


reply via email to

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