bug-lilypond
[Top][All Lists]
Advanced

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

Re: Formatting bug with 2.10.20


From: Mats Bengtsson
Subject: Re: Formatting bug with 2.10.20
Date: Mon, 19 Mar 2007 14:04:58 +0100
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

First of all, I don't think it's a bug. It's rather an example of an ill chosen
line break (or rather an unfortunate choice of LilyPond not to include a
line break). It seems that the line breaking mechanism in LilyPond thinks that the full piece is short enough that everything can fit on a single line. When you add the transposition, more accidentals are inserted which take horizontal space, so LilyPond can no longer fit it into a single line, but breaks it into two lines,
which of course gives a much looser spacing. In my experience, this has only
happened for short pieces. As soon as your score has at least 2 systems, then it will insert line breaks long before the spacing is this tight. The simple workaround
is to manually insert a \break at an appropriate place.

Secondly, the "bug" seems to be fixed in version 2.11.20, i.e. you get the same
line breaking with both versions of your example.

  /Mats

Raphael Manfredi wrote:
I've found a weird formatting bug.

In the attached file, the exo117a.ly is wrongly formatted on a single
line, as you can witness in the attached PNG rendering.

Changing the line 57 to read:

        \transpose d fis { \CanonLeaderThird \CanonBodyThird }

will produce something musically incoherent, but which formats
correctly, as witnesses by the attached exo117a-fix.png.

This is very annoying because even if I add a manual \break in the
correct version, the very last note is typesetted too close to the
ending bar.  So there's something abnormal going on here.

Raphael
------------------------------------------------------------------------

\version "2.10.10"
%#(ly:font-config-display-fonts)
\paper {
        topmargin = 0.2 \cm
        bottommargin = 0.5 \cm
        headseparation = 0.0 \cm
        footseparation = 0.0 \cm
}
\header {
        arranger = "Raphaël Manfredi"
        poet = "$Id: exo116a.ly,v 1.1 2007/03/11 21:41:02 ram Exp ram $"
        meter = "Modéré"
}
TimeKey = { \time 2/4 \key g \minor }
Fonts = {
  \override TextScript #'font-name = "Times New Roman"
  \override TextScript #'font-size = #'-3
  \override TextScript #'baseline-skip = #2
}
FigureFonts = {
  \override BassFigure #'font-name = "Times New Roman"
  \override BassFigure #'font-size = #'-3
}
% canon components
CanonLeader = \relative c' {
  f4 a16 g a8 |
}
CanonBody = \relative c'' {
        bes8 a bes ees | d4 c | d c | bes f | d' bes8 d |
        ees16 d c bes ees,4 |
}
CanonLeaderThird = \relative c' {
  d4 f16 ees f8 |
}
CanonBodyThird = \relative c'' {
  g8 f g c | bes4 a | bes a | g d | bes' g8 bes |
  c16 bes a g c,4 |
}
Soprano = \relative c'' {
  d4^\( ees | d ees | d c | bes a\) |
  g^\( a | bes c ~ | c8 bes a4 | g2\) |

  % canon in Bb major between Soprano and Alto
  \CanonLeader
  \repeat volta 2 {
        \CanonBody \CanonLeader
  }
  bes2
}
Alto = \relative c'' {
  bes4 c | bes8 g g4 ~ | g2 ~ | g4 fis |
  g fis | g2 | g4 fis | d2 |

  % canon in Bb major (perfect with soprano, at the 3rd)
  R1*1/2 |
  \repeat volta 2 {
        \transpose d d { \CanonLeaderThird \CanonBodyThird }
  }
  d2 |
}
Tenor = \relative c'' {
  g2 | g8 bes, c4 | bes ees | d2 |
  d2 ~ | d4 ees | d4. c8 | bes2 |
% canon in Bb major
  R1*1/2 |
  \repeat volta 2 {
        bes2 ~ | bes4 g' | f2 | bes,4 d | bes2 | ees2 | c2 |
  }
  bes2 |
}
Bass = \relative c' {
  g2_"I" ~ | g2 ~ | g4 c,_"IV" | d_"V6:4" d'8_"V(+#4)" c |
  bes4_"I6" a_"V6:4" | g_"I" c,_"IV" | d_"V6:4" d_"V(7+)" | g,2_"I" |

  % canon in Bb major
  R1*1/2 |
  \repeat volta 2 {
        bes4_"I" d_"I6" | g,4_"VI" ees'_"II6" | f2_"V6:4 - 5" |
        d4_"I6" d_"III" | g2_"VI" | g,4_"IV6" ees'_"II6" |
        a_"V6" f_"V" |
  }
  bes,2_"I" |
}
BassFigure = \figuremode {
  \set Staff.useBassFigureExtenders = ##t
}
Music = \new ChoirStaff \with {
  %\override VerticalAlignment #'forced-distance = #10
} <<
  \context Staff = soprano {
        #(set-accidental-style 'modern)
        \override Score.BarNumber #'extra-offset = #'(+0.0 . +0.5)
        \override Score.MetronomeMark #'extra-offset = #'(-5.2 . +1.8)
        \clef treble \TimeKey
        \tempo 4 = 96
        \Soprano
        \bar "|."
  }
  \context Staff = alto {
        #(set-accidental-style 'modern)
        \clef treble \TimeKey
        \Alto
  }
  \context Staff = tenor {
        #(set-accidental-style 'modern)
        \clef alto \TimeKey
        \Tenor
  }
  \context Staff = bass {
        #(set-accidental-style 'modern)
        \clef bass \TimeKey
        \Fonts
        \Bass
  }
  \context Staff = bass {
        \FigureFonts
        \BassFigure
  }
\score {
  \Music
  \header {
        piece =
        "Réalisation à 4 voix d'une basse chiffrée"
  }
  \layout {
        ragged-last = ##t
  }
}

\score {
  <<
        \context Staff = voiceOne {
          \set Staff.midiInstrument = "violin"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "flute"
          \TimeKey
          \unfoldRepeats \Soprano
        }
        \context Staff = voiceTwo {
          \set Staff.midiInstrument = "violin"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "oboe"
          \TimeKey
          \unfoldRepeats \Alto
        }
        \context Staff = voiceThree {
          \set Staff.midiInstrument = "viola"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "english horn"
          \TimeKey
          \unfoldRepeats \Tenor
        }
        \context Staff = voiceFour {
          \set Staff.midiInstrument = "cello"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "french horn"
          \TimeKey
          \unfoldRepeats \Bass
        }
  >>
\midi {
    \context {
      \Score
      tempoWholesPerMinute = #(ly:make-moment 96 4)
      }
    }
}

------------------------------------------------------------------------

\version "2.10.10"
%#(ly:font-config-display-fonts)
\paper {
        topmargin = 0.2 \cm
        bottommargin = 0.5 \cm
        headseparation = 0.0 \cm
        footseparation = 0.0 \cm
}
\header {
        arranger = "Raphaël Manfredi"
        poet = "$Id: exo116a.ly,v 1.1 2007/03/11 21:41:02 ram Exp ram $"
        meter = "Modéré"
}
TimeKey = { \time 2/4 \key g \minor }
Fonts = {
  \override TextScript #'font-name = "Times New Roman"
  \override TextScript #'font-size = #'-3
  \override TextScript #'baseline-skip = #2
}
FigureFonts = {
  \override BassFigure #'font-name = "Times New Roman"
  \override BassFigure #'font-size = #'-3
}
% canon components
CanonLeader = \relative c' {
  f4 a16 g a8 |
}
CanonBody = \relative c'' {
        bes8 a bes ees | d4 c | d c | bes f | d' bes8 d |
        ees16 d c bes ees,4 |
}
CanonLeaderThird = \relative c' {
  d4 f16 ees f8 |
}
CanonBodyThird = \relative c'' {
  g8 f g c | bes4 a | bes a | g d | bes' g8 bes |
  c16 bes a g c,4 |
}
Soprano = \relative c'' {
  d4^\( ees | d ees | d c | bes a\) |
  g^\( a | bes c ~ | c8 bes a4 | g2\) |

  % canon in Bb major between Soprano and Alto
  \CanonLeader
  \repeat volta 2 {
        \CanonBody \CanonLeader
  }
  bes2
}
Alto = \relative c'' {
  bes4 c | bes8 g g4 ~ | g2 ~ | g4 fis |
  g fis | g2 | g4 fis | d2 |

  % canon in Bb major (perfect with soprano, at the 3rd)
  R1*1/2 |
  \repeat volta 2 {
        \transpose d fis { \CanonLeaderThird \CanonBodyThird }
  }
  d2 |
}
Tenor = \relative c'' {
  g2 | g8 bes, c4 | bes ees | d2 |
  d2 ~ | d4 ees | d4. c8 | bes2 |
% canon in Bb major
  R1*1/2 |
  \repeat volta 2 {
        bes2 ~ | bes4 g' | f2 | bes,4 d | bes2 | ees2 | c2 |
  }
  bes2 |
}
Bass = \relative c' {
  g2_"I" ~ | g2 ~ | g4 c,_"IV" | d_"V6:4" d'8_"V(+#4)" c |
  bes4_"I6" a_"V6:4" | g_"I" c,_"IV" | d_"V6:4" d_"V(7+)" | g,2_"I" |

  % canon in Bb major
  R1*1/2 |
  \repeat volta 2 {
        bes4_"I" d_"I6" | g,4_"VI" ees'_"II6" | f2_"V6:4 - 5" |
        d4_"I6" d_"III" | g2_"VI" | g,4_"IV6" ees'_"II6" |
        a_"V6" f_"V" |
  }
  bes,2_"I" |
}
BassFigure = \figuremode {
  \set Staff.useBassFigureExtenders = ##t
}
Music = \new ChoirStaff \with {
  %\override VerticalAlignment #'forced-distance = #10
} <<
  \context Staff = soprano {
        #(set-accidental-style 'modern)
        \override Score.BarNumber #'extra-offset = #'(+0.0 . +0.5)
        \override Score.MetronomeMark #'extra-offset = #'(-5.2 . +1.8)
        \clef treble \TimeKey
        \tempo 4 = 96
        \Soprano
        \bar "|."
  }
  \context Staff = alto {
        #(set-accidental-style 'modern)
        \clef treble \TimeKey
        \Alto
  }
  \context Staff = tenor {
        #(set-accidental-style 'modern)
        \clef alto \TimeKey
        \Tenor
  }
  \context Staff = bass {
        #(set-accidental-style 'modern)
        \clef bass \TimeKey
        \Fonts
        \Bass
  }
  \context Staff = bass {
        \FigureFonts
        \BassFigure
  }
\score {
  \Music
  \header {
        piece =
        "Réalisation à 4 voix d'une basse chiffrée"
  }
  \layout {
        ragged-last = ##t
  }
}

\score {
  <<
        \context Staff = voiceOne {
          \set Staff.midiInstrument = "violin"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "flute"
          \TimeKey
          \unfoldRepeats \Soprano
        }
        \context Staff = voiceTwo {
          \set Staff.midiInstrument = "violin"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "oboe"
          \TimeKey
          \unfoldRepeats \Alto
        }
        \context Staff = voiceThree {
          \set Staff.midiInstrument = "viola"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "english horn"
          \TimeKey
          \unfoldRepeats \Tenor
        }
        \context Staff = voiceFour {
          \set Staff.midiInstrument = "cello"
          \set Staff.midiInstrument = "choir aahs"
          \set Staff.midiInstrument = "acoustic grand"
          \set Staff.midiInstrument = "french horn"
          \TimeKey
          \unfoldRepeats \Bass
        }
  >>
\midi {
    \context {
      \Score
      tempoWholesPerMinute = #(ly:make-moment 96 4)
      }
    }
}

------------------------------------------------------------------------


------------------------------------------------------------------------

------------------------------------------------------------------------

_______________________________________________
bug-lilypond mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-lilypond

--
=============================================
        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]