]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.118.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 19 Dec 2000 22:06:46 +0000 (23:06 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 19 Dec 2000 22:06:46 +0000 (23:06 +0100)
1.3.118.jcn2
============

* Added some feature examples.

* Bugfix for \partial and auto-beamer.

13 files changed:
CHANGES
Documentation/index.texi
Documentation/regression-test.tely
Documentation/user/GNUmakefile
Documentation/user/features.tely
VERSION
input/bugs/lyrics-bar.ly [new file with mode: 0644]
input/bugs/partial-beam.ly [new file with mode: 0644]
input/bugs/slur-dx.ly [new file with mode: 0644]
input/test/beam-dir-function.ly [new file with mode: 0644]
input/test/lyrics-bar.ly
lily/auto-beam-engraver.cc
scm/backend-property.scm

diff --git a/CHANGES b/CHANGES
index afa741d7b7114fc1b1cc8a3c97b7dd2cc7d2c386..19db80ad89d996a6e5b8673c7858b078a9d0948c 100644 (file)
--- 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
 ============
 
index 91a60d6e0149533e96aaab2f78ab8e7307c44d70..6607283680f2eebdb118cb62af0c28772fddd0fa 100644 (file)
@@ -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
index 4bec2bfaec9decd64f2fc8e8e2200f3617fad87c..d059ce771c1e5395cfe3c8671aab56b8c1726267 100644 (file)
@@ -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}
index 32f8816323cc52c653378d18920b1c498b9c0851..d8d035834e74c555c8e2e22da39f17a726957ec5 100644 (file)
@@ -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
 
index e0d85a7de4a8b9ac2a5622a881b28b97ab403fef..dbb876e0215fa8c7f4f8bcc034ade06157c93871 100644 (file)
@@ -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 9e517caed2ffa93fe1b01ec5ee1a75277f8b8074..24e08ccff07c3ce256f7c647fa3f0b7a4a9ccedd 100644 (file)
--- 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 (file)
index 0000000..ec0309b
--- /dev/null
@@ -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 (file)
index 0000000..e3d0192
--- /dev/null
@@ -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 (file)
index 0000000..02cfbf9
--- /dev/null
@@ -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 (file)
index 0000000..d445468
--- /dev/null
@@ -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] 
+  }
+}
index 998ce458ee858b542855f8f4af2c002cb11d2929..ec0309b3221556affad21dda2e0a2252dc9aef45 100644 (file)
@@ -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
index 07ff86dceb4649d770cfd8b2c16ec7aa1866bf59..1dafaad75be120cc1836f2ec1b00cb3da034b88a 100644 (file)
@@ -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)
index e7c7c4e558b5a04a887bd472db6130924708078d..ebb343993fd5ea08b22521b8720f647481d040e5 100644 (file)
@@ -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.")