From a3efe5a3c5f6b2a0c1e910deea98774bf7076caa Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:34:58 +0000 Subject: [PATCH] lilypond-1.3.119 --- Documentation/index.texi | 2 ++ Documentation/regression-test.tely | 3 +++ Documentation/user/GNUmakefile | 4 +-- input/bugs/lyrics-bar.ly | 39 +++++++++++++++++++++++++++++ input/bugs/partial-beam.ly | 25 +++++++++++++++++++ input/bugs/slur-dx.ly | 19 ++++++++++++++ input/test/beam-dir-function.ly | 40 ++++++++++++++++++++++++++++++ input/test/lyrics-bar.ly | 3 ++- lily/auto-beam-engraver.cc | 14 ++++++++++- 9 files changed, 145 insertions(+), 4 deletions(-) create mode 100644 input/bugs/lyrics-bar.ly create mode 100644 input/bugs/partial-beam.ly create mode 100644 input/bugs/slur-dx.ly create mode 100644 input/test/beam-dir-function.ly diff --git a/Documentation/index.texi b/Documentation/index.texi index 91a60d6e01..6607283680 100644 --- a/Documentation/index.texi +++ b/Documentation/index.texi @@ -24,6 +24,8 @@ @item @uref{../user/out-www/lilypond/lilypond.html,LilyPond reference manual} also available in @uref{../user/out-www/lilypond.ps.gz,Postscript} @item LilyPond @uref{../user/out-www/lilypond-internals/lilypond-internals.html,internals} +@item @uref{../user/out-www/features/features.html, LilyPond features} +work in progress, to me merged with reference manual. @item @uref{../user/out-www/glossary.html,A glossary of musical terms}, includes translations. Also available in @uref{../user/out-www/glossary.ps.gz,Postscript}) @item @uref{../user/out-www/lilypond-book.html,lilypond-book}, a tool for diff --git a/Documentation/regression-test.tely b/Documentation/regression-test.tely index 4bec2bfaec..d059ce771c 100644 --- a/Documentation/regression-test.tely +++ b/Documentation/regression-test.tely @@ -91,8 +91,11 @@ and documenting bugfixes. @lilypondfile{beam-length.ly} +@lilypondfile{beam-dir-function.ly} + @lilypondfile{triplets.ly} + @lilypondfile{slur-nice.ly} @lilypondfile{slur-symmetry.ly} @lilypondfile{slur-symmetry-1.ly} diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index 32f8816323..d8d035834e 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -45,7 +45,7 @@ info: $(INFO_FILES) # The next version of makeinfo should split html files into their own # directory. For now available only as patches from # http://appel.lilypond.org/software -SPLITTING_MAKEINFO = $(shell makeinfo --version | grep 4.0.jcn2) +SPLITTING_MAKEINFO = $(shell makeinfo --version | grep '4.0.jcn[2,3]') # Generic rule using % twice not possible? @@ -67,7 +67,7 @@ $(outdir)/features/features.html: $(outdir)/features.texi ifneq ($(SPLITTING_MAKEINFO),) -DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html +DEEP_HTML_FILES = $(outdir)/lilypond/lilypond.html $(outdir)/lilypond-internals/lilypond-internals.html $(outdir)/features/features.html else diff --git a/input/bugs/lyrics-bar.ly b/input/bugs/lyrics-bar.ly new file mode 100644 index 0000000000..ec0309b322 --- /dev/null +++ b/input/bugs/lyrics-bar.ly @@ -0,0 +1,39 @@ +\header{ +texidoc=" +Adding a @code{Bar_engraver} to the LyricsVoice context makes sure that +lyrics don't collide with barlines. +"; +} + +\score { + \context StaffGroup < + \notes \context Staff { + b1 b1 \bar "|."; + } + \lyrics\context Lyrics < + \context LyricsVoiceWithBars { +% thisContextHasSpanBarEngraver1 added + ThisContextCertainlyHasSpanBarEngraverAddedButTheresSomethingFunny1. Here. + } + \context LyricsVoice { + this4 one has no SpanBarEngraverAddedToContext1 + } + > + \notes \context Staff = SB { b1 b1 } + > + \paper { + linewidth = -1.0\cm; + \translator { + \LyricsContext + \consists "Span_bar_engraver"; + \accepts "LyricsVoiceWithBars"; + } + \translator { + \LyricsVoiceContext + \name "LyricsVoiceWithBars"; + } + \translator { + \LyricsVoiceContext + } + } +} diff --git a/input/bugs/partial-beam.ly b/input/bugs/partial-beam.ly new file mode 100644 index 0000000000..e3d0192523 --- /dev/null +++ b/input/bugs/partial-beam.ly @@ -0,0 +1,25 @@ +\include "paper20.ly" +Sopnotes = \notes { + \time 4/4; + \key g \major; + \clef treble; + \partial 8 * 3; + e'8 f'8 g'8 | + d'8 d'16 d'16 e'8. e'16 g'8 g'8 f'8 f'8 +} + +\score { + \notes + < + \context Staff="sop" + < + \$Sopnotes + > + > + \paper { + \translator { + \StaffContext + autoBeamSettings \override #'(end * * * * ) = #(make-moment 1 8) + } + } +} diff --git a/input/bugs/slur-dx.ly b/input/bugs/slur-dx.ly new file mode 100644 index 0000000000..02cfbf9413 --- /dev/null +++ b/input/bugs/slur-dx.ly @@ -0,0 +1,19 @@ +\header{ +texidoc=" +Arg, right ending of slur is too far right. I did make a better +test .ly for this, but can't seem to find it now. +"; +} + +\score { + \notes \relative c'' { + \property Voice.Stem \set #'direction = #1 + \property Voice.Slur \set #'direction = #1 + d,32( d'4 )d8.. + \property Voice.Slur \set #'attachment = #'(stem . stem) + d,32( d'4 )d8.. + } + \paper { + linewidth = -1.; + } +} diff --git a/input/test/beam-dir-function.ly b/input/test/beam-dir-function.ly new file mode 100644 index 0000000000..d445468a09 --- /dev/null +++ b/input/test/beam-dir-function.ly @@ -0,0 +1,40 @@ +\header{ +texidoc=" +There are several ways to calculate the direction of a beam + +@table @samp +@item majority +number count of up or down notes +@item mean +mean centre distance of all notes +@item median +mean centre distance weighted per note +@end table + +We should see: + + up down down + + up up down +"; +} + +\score { + \notes \relative c'' { + % the default + %\property Voice.Beam \set #'dir-function = #beam-dir-majority + [d8 a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a] + + \property Voice.Beam \set #'dir-function = #beam-dir-majority + \time 3/8; + [d8 a a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a a] + } +} diff --git a/input/test/lyrics-bar.ly b/input/test/lyrics-bar.ly index 998ce458ee..ec0309b322 100644 --- a/input/test/lyrics-bar.ly +++ b/input/test/lyrics-bar.ly @@ -12,7 +12,8 @@ lyrics don't collide with barlines. } \lyrics\context Lyrics < \context LyricsVoiceWithBars { - thisContextHasSpanBarEngraver1 added +% thisContextHasSpanBarEngraver1 added + ThisContextCertainlyHasSpanBarEngraverAddedButTheresSomethingFunny1. Here. } \context LyricsVoice { this4 one has no SpanBarEngraverAddedToContext1 diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 07ff86dceb..1dafaad75b 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -165,7 +165,19 @@ Auto_beam_engraver::test_moment (Direction dir, Moment test_mom) Rational r; if (moment) - r = unsmob_moment (get_property ("measurePosition"))->mod_rat (moment); + { + /* Ugh? measurePosition can be negative, when \partial + We may have to fix this elsewhere (timing translator) + r = unsmob_moment (get_property ("measurePosition"))->mod_rat (moment); + */ + Moment pos = * unsmob_moment (get_property ("measurePosition")); + if (pos < Moment (0)) + { + Moment length = * unsmob_moment (get_property ("measureLength")); + pos = length - pos; + } + r = pos.mod_rat (moment); + } else { if (dir == START) -- 2.39.5