From: Jan Nieuwenhuizen Date: Tue, 19 Dec 2000 22:06:46 +0000 (+0100) Subject: patch::: 1.3.118.jcn2 X-Git-Tag: release/1.3.119~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=50db74300631704bf9b49eb844434190f2fa811b;p=lilypond.git patch::: 1.3.118.jcn2 1.3.118.jcn2 ============ * Added some feature examples. * Bugfix for \partial and auto-beamer. --- diff --git a/CHANGES b/CHANGES index afa741d7b7..19db80ad89 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,10 @@ +1.3.118.jcn2 +============ + +* Added some feature examples. + +* Bugfix for \partial and auto-beamer. + 1.3.118.jcn1 ============ 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/Documentation/user/features.tely b/Documentation/user/features.tely index e0d85a7de4..dbb876e021 100644 --- a/Documentation/user/features.tely +++ b/Documentation/user/features.tely @@ -19,6 +19,7 @@ TODO * Slur attachments:: Slur attachments * Text spanner:: Text spanner * Engraver hacking:: Engraver hacking +* Part combiner:: Part combiner * Markup text:: Markup text * Output property:: Output property * Embedded TeX:: Embedded TeX @@ -67,8 +68,6 @@ Testin'' a b c... > @end lilypond -@c part combiner - @node Manual beam settings @section Manual beam settings @@ -112,14 +111,77 @@ Don't extend to middle line esp. for grace \grace g8 g4 @end lilypond -@c beam slope -@c beam start beam end +Beam slope (height) + +Horizontal beam + +@lilypond[fragment,relative,verbatim,center] + \property Voice.Beam \set #'direction = #1 + \property Voice.Beam \set #'height-hs = #0 + [a''8 e' d c] +@end lilypond + +beam start-y beam-height + +Weird beam +@lilypond[fragment,relative,verbatim,center] + \property Voice.Beam \set #'y-position-hs = #4 + \property Voice.Beam \set #'height-hs = #-4 + [c'8 c] +@end lilypond + + +Like stem... + +@lilypond[fragment,relative,verbatim,center] + [b''8 b] + \property Voice.Beam \set #'default-neutral-direction = #-1 + [b b] +@end lilypond + +There are several ways to calculate the direction of a beam. + +[Ross] states that the majority of the notes dictates the +direction (and not the mean of "center distance") + +But is that because it really looks better, or because he wants +to provide some real simple hands-on rules? + +We have our doubts, so we simply provide all sensible alternatives: + +@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 + +You can spot the difference of these settings quite easily from these simple examples: + +@lilypond[fragment,relative,verbatim,center] + [d''8 a] + \property Voice.Beam \set #'dir-function = #beam-dir-mean + [d a] + \property Voice.Beam \set #'dir-function = #beam-dir-median + [d a] +@end lilypond + +@lilypond[fragment,relative,verbatim,center] + \time 3/8; + [d''8 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] +@end lilypond @node Slur attachments @section Slur attachments -BUG Override attachments... +Override attachments... @lilypond[fragment,relative,verbatim,center] \property Voice.Slur \set #'direction = #1 \property Voice.Stem \set #'length = #5.5 @@ -130,6 +192,37 @@ BUG Override attachments... g4(g8)g @end lilypond + +Test Before, after + +@c Ugh, ugh @multitable is broken in texinfo-4.0 +@c Fixed in 4.0.jcn3 +@c We'll have to postpone this before/after representation until +@c jcn3 is rolled into texinfo... + +@multitable @columnfractions .50 .50 +@item +@noindent +@lilypond[fragment,relative,verbatim,center] +\property Voice.Slur + \set #'direction = #1 +g''8(g)g4 +g4(g8)g +@end lilypond +@tab +@lilypond[fragment,relative,verbatim,center] +\property Voice.Slur + \set #'direction = #1 +\property Voice.Stem + \set #'length = #5.5 +\property Voice.Slur + \set #'attachment = #'(stem . stem) +g''8(g)g4 +g4(g8)g +@end lilypond +@end multitable + + Ophee slurs... @lilypond[fragment,relative,verbatim,center] \property Voice.Slur \set #'direction = #1 @@ -138,7 +231,15 @@ Ophee slurs... @end lilypond -@c steep slur correct +Steep slur correct... +@lilypond[fragment,relative,verbatim,center] + \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.. +@end lilypond + @c high slurs, eg from gnossienes @@ -166,6 +267,7 @@ Have crescendo set a text spanner iso hairpin @end lilypond + @node Engraver hacking @section Engraver hacking @@ -177,11 +279,11 @@ No time signature, no barlines... d c b a } \paper { + linewidth = -1.; \translator { \StaffContext whichBar = #"" \remove "Time_signature_engraver"; - linewidth = -1.; } } } @@ -192,18 +294,54 @@ No staff, no clef, squash pitches \score { \notes { c4 c4 c8 c8 } \paper { + linewidth = -1.; \translator { \StaffContext \remove Staff_symbol_engraver; \consists Pitch_squash_engraver; \remove Clef_engraver; } - linewidth = -1.; } } @end lilypond +@node Part combiner +@section Part combiner + +@lilypond[verbatim,center] +\score{ + \context Staff = flauti < + \time 4/4; + \context Voice=one \partcombine Voice + \context Thread=one \notes\relative c'' { + c4 d e f | b,4 d c d | r2 e4 f | c4 d e f | + c4 r e f | c4 r e f | c4 r a r | a a r a | + a2 \property Voice.soloADue = ##f a | + } + \context Thread=two \notes\relative c'' { + g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d + c r e r | r2 s2 | a,4 r a r | a r r a | + a2 \property Voice.soloADue = ##f a | + } + > + \paper{ + linewidth = 80 * \staffspace; + \translator{ + \ThreadContext + \consists Rest_engraver; + } + \translator{ + \VoiceContext + \remove Rest_engraver; + } + } +} +@end lilypond + + + + @node Markup text @section Markup text @@ -256,11 +394,17 @@ Don't move the finger 2, only text "m.d." ... } @end lilypond - @c subsection no clefs + @c equalizer +@c \apply hacking +@c reverse +@c smart transpose + + + @c Embedded TeX @node Embedded TeX @@ -273,6 +417,8 @@ Don't move the finger 2, only text "m.d." ... @section Embedded PostScript Arbitrary lines and curves not supported... +[TODO:] Make a direct postscript command? + @lilypond[verbatim,center] \score { \notes \relative c'' { diff --git a/VERSION b/VERSION index 9e517caed2..24e08ccff0 100644 --- a/VERSION +++ b/VERSION @@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 PATCH_LEVEL=118 -MY_PATCH_LEVEL=tca1 +MY_PATCH_LEVEL=jcn2 # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. 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) diff --git a/scm/backend-property.scm b/scm/backend-property.scm index e7c7c4e558..ebb343993f 100644 --- a/scm/backend-property.scm +++ b/scm/backend-property.scm @@ -83,8 +83,6 @@ Align_interface::center_on_element). ") (grob-property-description 'dashed number? "[FIXME: use dash-period/dash length; see text-spanner] number representing the length of the dashes.") (grob-property-description 'de-uglify-parameters list? "list of 3 real constants. They define the valid areas for the middle control points. Used in de_uglyfy. They are a bit empirical.") (grob-property-description 'default-neutral-direction dir? "Where to go if we're in the middle of the staff") -(grob-property-description 'default-neutral-direction dir? "which -direction to choose if we're in the middle of the staff ") (grob-property-description 'delta-y number? "amount of ascension") (grob-property-description 'dependencies list? "list of score-grob pointers that indicate who to compute first for certain global passes") (grob-property-description 'details list? "alist of parameters for the curve shape") @@ -150,6 +148,7 @@ is used by @ref{note-collision-interface}") (grob-property-description 'heads pair? "pair of grob pointers, pointing to the two heads of the tie. ") (grob-property-description 'heads list? "list of note heads") (grob-property-description 'height number? "in staffspace ") +(grob-property-description 'height-hs number? "in halfspace. Only used by Beam.") (grob-property-description 'height-quants procedure? "function of type (beam staff-line-thickness) -> list of quants. Default value: default-beam-dy-quants. ") (grob-property-description 'horizontal-shift integer? "integer that identifies ranking of note-column for horizontal shifting. This is used by @ref{note-collision-interface}") @@ -310,3 +309,4 @@ function of type (beam multiplicity dy staff-line-thickness) -> real. Default v (grob-property-description 'x-gap number? "horizontal gap between notehead and tie") (grob-property-description 'y-free number? "minimal vertical gap between slur and noteheads or stems") (grob-property-description 'y-position number? "position of left edge") +(grob-property-description 'y-position-hs number? "in half space, position of left edge. Only used by Beam.")