lilypond-user
[Top][All Lists]
Advanced

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

Aligning triplets evenly


From: Helge Kruse
Subject: Aligning triplets evenly
Date: Wed, 26 Dec 2012 10:07:57 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Lilypond promises to generate nicely scores. (http://lilypond.org/doc/v2.16/Documentation/essay/engraving-details#optical-spacing)

This works in most cases. But I have currently a score that shows ugly triplets. It should spread the note heads evenly aligned in the X-axis. The excerpt below shows the problem. Why is only the first triplet evenly aligned and how can I fix this? There are tons of triplets of this kind in the piece. Therefore I would avoid a tweak at the individual measures.

Regard
Helge


\version "2.16.0"
\language "deutsch"

global = {
  \key c \minor
  \time 4/4
  \tempo "Allegro Moderato"
}

% abbreviation for a triplet, \times 2/3 { ... } would be a bit annoying
tr = #(define-music-function (parser location p1 p2 p3)
        (ly:pitch? ly:pitch? ly:pitch?)
        #{
          \times 2/3 { $p1 8 [ $p2 $p3 ] }
        #})

\parallelMusic #'( harpR harpL) {
  g4. as16 g g8 g g g |
  \tr g c es  \tr g, c es  \tr g, d' f  \tr g, d' f |
  R1*6 | % consume some space after the measures above
  R1*6 |
}

harpPart = \new PianoStaff \with {
  instrumentName = "Hf."
} <<
  \new Staff = "upper" \with {
    midiInstrument = "orchestral harp"
  } \relative c'' { \global \harpR }
  \new Staff = "lower" \with {
    midiInstrument = "orchestral harp"
  } \relative c { \global \clef bass \harpL }
>>

\score {
  \harpPart
}



reply via email to

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