lilypond-user
[Top][All Lists]
Advanced

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

Collision challenge


From: Nicolas Sceaux
Subject: Collision challenge
Date: Fri, 02 Dec 2005 21:28:21 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

Hi,

I'm facing some collision problems in a score with three voices on one
staff:

\version "2.7.21"
\layout { raggedright = ##t }

forceBeamLength = 
#(def-music-function (parser location length) (number?)
  #{
  \override Voice.Stem #'details #'beamed-lengths = #(list $length)
  \override Voice.Stem #'details #'beamed-minimum-free-lengths = #(list $length)
  \override Voice.Stem #'details #'beamed-extreme-minimum-free-lengths = #(list 
$length)
  #})

revertBeamLength = {
  \revert Voice.Stem #'details #'beamed-lengths
  \revert Voice.Stem #'details #'beamed-minimum-free-lengths
  \revert Voice.Stem #'details #'beamed-extreme-minimum-free-lengths
}

shiftOnce = { \once \override NoteColumn #'horizontal-shift = #1 }

\new Staff <<
  \time 2/2
  \key f \major
  \clef alto
  \new Voice {
    b4^\prall
    \voiceOne g' ~ g'4 f' ~ |
    f'4 e' ~ e'4 d' ~ |
    d' c' ~ 
    c'2
  }
  \new Voice {
    s4 \stemUp c'8\rest
    \override Voice.Stem #'details #'lengths = #'(3.0)
    \tieDown
    c'8 ~
    \forceBeamLength #1.5
    \tieUp
    c'4 ~
    \shiftOnce
    c'8 b ~ |
    b4 ~ 
    \forceBeamLength #1.0
    \shiftOnce
    b8 a ~ a4 ~ 
    \shiftOnce
    a8 g ~ |
    g4. 
    \override Voice.Stem #'details #'lengths = #'(2.5)
    \tieDown
    g8 ~ \stemDown \revertBeamLength g \tieUp a ~ a g
  }
  \new Voice {
    s4 \voiceTwo s4 c'8 a ~ a4 ~ |
    \shiftOnce a8 g ~ g4 ~ \shiftOnce g8 f ~ f4 ~ |
    \shiftOnce f8 e ~ e4
  }
>>

PNG image

I would like to shift the 8th notes of the lower voice, on beats 1 and 3
of the second measure, and the first beat of the third measure, so that
they should not collide with the quater note of the middle voice.
Using \override NoteColumn #'horizontal-shif does not help, for a reason
that I don't get.

I'd be pleased if someone can find a solution.

nicolas

reply via email to

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