]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.4.0.jcn7
authorJan Nieuwenhuizen <janneke@gnu.org>
Tue, 15 May 2001 13:37:24 +0000 (15:37 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Tue, 15 May 2001 13:37:24 +0000 (15:37 +0200)
1.4.0.jcn7
==========

* Added \tupletUp, \tupletDown, \tupletBoth.

* Bugfix convert-ly: treCorde.

* Slur attachment and extremity offsets taken relative to slur
direction; so that
   Slur \override #'attachment-offset = #'((0 . 1) . (0 . 1))
will always make the slur move away from the note head.

* Bugfix: slurs on dotted or flagged notes.

* Refman fixes.

* Added @reng, @rgrob, and @rint macros for referencing engravers,
grobs and interfaces in documentation.

CHANGES
Documentation/regression-test.tely
Documentation/user/macros.itexi
Documentation/user/refman.itely
VERSION
input/regression/slur-staccato.ly [new file with mode: 0644]
input/test/slur-attachment-override.ly
lily/slur.cc
ly/property.ly
scm/slur.scm
scripts/convert-ly.py

diff --git a/CHANGES b/CHANGES
index 55024df5930182b7f382606061569be0ee91c479..c9b9282712f0250efee58cab8a7c08ba21fbf0ee 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,22 @@
+1.4.0.jcn7
+==========
+
+* Added \tupletUp, \tupletDown, \tupletBoth.
+
+* Bugfix convert-ly: treCorde.
+
+* Slur attachment and extremity offsets taken relative to slur
+direction; so that
+   Slur \override #'attachment-offset = #'((0 . 1) . (0 . 1))
+will always make the slur move away from the note head.
+
+* Bugfix: slurs on dotted or flagged notes.
+
+* Refman fixes.
+
+* Added @reng, @rgrob, and @rint macros for referencing engravers,
+grobs and interfaces in documentation.
+
 1.4.0.jcn6
 ==========
 
index cf40a7a18238011f6260f27dd8bb5129175eb36a..55db0ae143b46668cdcd9b8f0bfc5cd1719d4529 100644 (file)
@@ -105,6 +105,7 @@ and documenting bugfixes.
 
 @lilypondfile[printfilename]{triplets.ly}
 
+
 @section  Slurs 
 
 @lilypondfile[printfilename]{slur-nice.ly}
@@ -125,6 +126,9 @@ and documenting bugfixes.
 
 @lilypondfile[printfilename]{phrasing-slur.ly}
 
+@lilypondfile[printfilename]{slur-staccato.ly}
+
+
 @section Ties
 
 @lilypondfile[printfilename]{tie.ly}
index b7185a03bab9c5d8f9b653e6d0ad4ec0be35bb46..b817a23ab9ec139b39a5261b222575d4537f84e4 100644 (file)
@@ -1,16 +1,46 @@
-@ifinfo
+@ifnottex
 @macro reng {word}
-@ref{ (lilypond-internals)Engraver \word\, \word\ },
+@ref{ (lilypond-internals)\word\, \word\ },
 
 @end macro
-@end ifinfo
+@end ifnottex
 
-@ifnotinfo
+@iftex
 @macro reng {word}
-@ref{ (lilypond-internals)Engraver \word\, \word\ }
+\word\
 
 @end macro
-@end ifnotinfo
+@end iftex
+
+
+@ifnottex
+@macro rgrob {word}
+@ref{ (lilypond-internals)\word\, \word\ },
+
+@end macro
+@end ifnottex
+
+@iftex
+@macro rgrob {word}
+\word\
+
+@end macro
+@end iftex
+
+
+@ifnottex
+@macro rint {word}
+@ref{ (lilypond-internals)\word\, \word\ },
+
+@end macro
+@end ifnottex
+
+@iftex
+@macro rint {word}
+\word\
+
+@end macro
+@end iftex
 
 
 
index cfff6a0574f49c360cc9775e12f0d1a3751fe5ca..0126eedb02ad2ddf83d020e7f82f81b76f7cf029 100644 (file)
@@ -474,7 +474,8 @@ printed.  The shorthand is only available in Note and Chord mode.
 
 @cindex @code{\key}
 
-Changing the key signature is done with the @code{\key} command.
+Setting or changing the key signature is done with the @code{\key}
+command.
 @example
   @code{\key} @var{pitch} @var{type}
 @end example
@@ -498,7 +499,7 @@ The standard mode names @code{\ionian},
 
 This command sets the context property @code{Staff.keySignature}. 
 Non-standard key signatures can be specified by setting this property
-directly, see the generated documentation.
+directly, see the generated documentation for @rgrob{KeySignature}.
 
 The printed signature is a @code{KeySignature} grob.
 
@@ -508,8 +509,10 @@ The printed signature is a @code{KeySignature} grob.
 @node Clef
 @subsection Clef
 @cindex @code{\clef}
+
+The clef can be set or changed with the @code{\clef} command.
 @example
-  \clef @var{clefname} @code{;}
+  \clef @var{clefname}
 @end example
 
 Shortcut for
@@ -608,7 +611,8 @@ Editio XXX.''
 @cindex meter
 @cindex @code{\time}
 
-The time signature is changed by the @code{\time} command. Syntax:
+The time signature is set or changed by the @code{\time}
+command. Syntax:
 @example
   \time @var{n}@code{/}@var{d} 
 @end example
@@ -624,9 +628,26 @@ should be inserted, and how automatic beams should be
 generated.
 
 Changing the value of @code{timeSignatureFraction} also causes a
-fraction to be printed. This grob is @code{TimeSignature}.  There are
-many options for the layout of this grob. They are selected through the
-@code{style} grob property. See @file{input/test/time.ly} for examples.
+fraction to be printed. This grob is @code{TimeSignature}.
+
+The actual symbol that's printed can be customised with the style
+property.
+@lilypond[fragment, verbatim, singleline]
+\time 3/4 s2
+\property Staff.TimeSignature \override #'style = #'C
+\time 4/4 s2
+\property Staff.TimeSignature \override #'style = #'()
+\time 4/4 s2
+\property Staff.TimeSignature \override #'style = #'C
+\time 2/2 s2
+@end lilypond
+
+There are many more options for the layout of this grob. They are
+selected through the @code{style} grob property.
+
+@c FIXME: this isn't documented except in example?
+See
+@file{input/test/time.ly} for examples.
 
 @c .   {Partial}
 @subsection Partial
@@ -1086,7 +1107,7 @@ Metronome settings can be entered as follows:
   \tempo @var{duration} = @var{perminute} 
 @end example
 
-For example, @code{\tempo 4 = 76;} requests output with 76 quarter notes
+For example, @code{\tempo 4 = 76} requests output with 76 quarter notes
 per minute.
   
 @refbugs
@@ -1775,7 +1796,8 @@ c''4 \spanrequest \stop "Sustain"
 
 The symbols that are printed can be modified by setting
 @code{pedal@var{X}Strings}, where @var{X} is one of the pedal
-types. Refer to the generated documentation for more information.
+types. Refer to the generated documentation of @rgrob{PianoPedal} for
+more information.
 
 @refbugs
 
@@ -2535,9 +2557,10 @@ may set the property @var{soloADue} to false.
 
 There are a number of other properties that you can use to tweak the
 behavior of part combining, refer to the automatically generated
-documentation. Look at the documentation of the responsible engravers,
-@code{Thread_devnull_engraver}, @code{Voice_devnull_engraver} and
-@code{A2_engraver}.
+documentation of @reng{Thread_devnull_engraver} and
+@reng{Voice_devnull_engraver}. Look at the documentation of the
+responsible engravers, @code{Thread_devnull_engraver},
+@code{Voice_devnull_engraver} and @code{A2_engraver}.
 
 @refbugs
 
@@ -3029,7 +3052,7 @@ overstrike text}
 The markup is broken down and converted into a list of grob properties,
 which are prepended to the property list.  The @var{key}-@var{value}
 pair is a grob property. A list of properties available is included in
-the generated documentation for @code{text-interface}
+the generated documentation for @rint{Text_interface}.
 
 The following abbreviations are currently defined:
 @table @code
@@ -4124,10 +4147,10 @@ identifiers called @var{name}@code{Context}, e.g. @code{StaffContext},
 If you want to build a context from scratch, you must also supply the
 following extra information:
 @itemize @bullet
-  @item  A name, specified by @code{\name @var{contextname};}.
+  @item  A name, specified by @code{\name @var{contextname}}.
 
   @item A cooperation module. This is specified by   @code{\type
-@var{typename};}.
+@var{typename}}.
 @end itemize
 
 This is an example:
diff --git a/VERSION b/VERSION
index cdf5bf1632a4a58f34720b45410726b5d031147f..4cdfcd10c9dee6874434d8313f57ad1277311e66 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=4
 PATCH_LEVEL=0
-MY_PATCH_LEVEL=jcn6
+MY_PATCH_LEVEL=jcn7
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
diff --git a/input/regression/slur-staccato.ly b/input/regression/slur-staccato.ly
new file mode 100644 (file)
index 0000000..53c31a4
--- /dev/null
@@ -0,0 +1,16 @@
+\header {
+texidoc="Manual hack for slur and staccato."
+}
+
+\paper { linewidth = -1.0 }
+
+\score {
+  \context Staff \notes\relative c'' {
+    \property Voice.Slur \override
+      #'attachment-offset = #'((0 . 1) . (0 . 1))
+    a-.( g-. )a-.
+    \property Voice.Slur \override
+      #'attachment-offset = #'((0 . 1.5) . (0 . 1.5))
+    b-.( a-. )b-.
+  }
+}      
\ No newline at end of file
index bf48d0bdaa9c91295d15159cd50517b140452f8f..d747f24956c7d97f2ef6efd1790cd495b8d8a4d3 100644 (file)
@@ -8,11 +8,12 @@ In some cases, you may want to set slur attachments by hand.
 
 
 fragment = \notes {
+  \property Voice.noAutoBeaming = ##t
   \property Voice.Stem \set #'direction = #1
   \property Voice.Slur \set #'direction = #1
-  d'32( d'4 )d8..
+  d'32( f'4 )d8..
   \property Voice.Slur \set #'attachment = #'(stem . stem)
-  d,32( d'4 )d8..
+  d,32( f'4 )d8.
 }
 
 \paper { linewidth = -1. } 
index 7f04c7c6218742e676cf770ca94e3995dd1f594a..33d0ce5757d8af39370401d8b831bb1e586e43ed 100644 (file)
@@ -156,7 +156,9 @@ Slur::check_slope (Grob *me)
          o[LEFT] = ly_scm2offset (index_cell (a, LEFT));
          o[RIGHT] = ly_scm2offset (index_cell (a, RIGHT));
          o[d][Y_AXIS] -= (limit - slope) * dx * dir / staff_space;
-         //o[d][Y_AXIS] = attachment[-d][Y_AXIS] + (dx * limit * dir / staff_space);
+
+         o[d][Y_AXIS] *= Directional_element_interface::get (me);
+
          me->set_grob_property ("attachment-offset",
                                gh_cons (ly_offset2scm (o[LEFT]),
                                         ly_offset2scm (o[RIGHT])));
@@ -278,6 +280,11 @@ Slur::get_attachment (Grob *me, Direction dir,
       Grob * n =sp->get_bound (dir);
       if ((stem = Note_column::stem_l (n)))
        {
+         Real x_extent;
+         if (Grob *head = Note_column::first_head (n))
+           x_extent = head->extent (head, X_AXIS).length ();
+         else
+           x_extent = n->extent (n, X_AXIS).length ();
 
          if (str == "head")
            {
@@ -286,7 +293,7 @@ Slur::get_attachment (Grob *me, Direction dir,
              /*
                Default position is centered in X, on outer side of head Y
               */
-             o += Offset (0.5 * n->extent (n,X_AXIS).length (),
+             o += Offset (0.5 * x_extent,
                           0.5 * staff_space
                           * Directional_element_interface::get (me));
            }
@@ -296,8 +303,7 @@ Slur::get_attachment (Grob *me, Direction dir,
              /*
                Default position is on stem X, on outer side of head Y
               */
-             o += Offset (n->extent (n,X_AXIS).length ()
-                          * (1 + Stem::get_direction (stem)),
+             o += Offset (x_extent * (1 + Stem::get_direction (stem)),
                           0.5 * staff_space
                           * Directional_element_interface::get (me));
            }
@@ -308,10 +314,8 @@ Slur::get_attachment (Grob *me, Direction dir,
                Default position is on stem X, at stem end Y
               */
              o += Offset (0.5 *
- (n->extent (n,X_AXIS).length ()
-                           - stem->extent (stem,X_AXIS).length ())
-                           * (1 + Stem::get_direction (stem)),
-                           0);
+                          x_extent * (1 + Stem::get_direction (stem)),
+                          0);
            }
        }
     }
@@ -332,14 +336,17 @@ Slur::get_attachment (Grob *me, Direction dir,
   int stemdir = stem ? Stem::get_direction (stem) : 1;
   int slurdir = gh_scm2int (me->get_grob_property ("direction"));
   SCM l = scm_assoc
- (scm_listify (a,
-                gh_int2scm (stemdir * dir),
-                gh_int2scm (slurdir * dir),
   (scm_listify (a,
+                 gh_int2scm (stemdir * dir),
+                 gh_int2scm (slurdir * dir),
                   SCM_UNDEFINED), alist);
 
   if (l != SCM_BOOL_F)
     {
-      o += ly_scm2offset (gh_cdr (l)) * staff_space * dir;
+      Offset off = ly_scm2offset (gh_cdr (l)) * staff_space;
+      off[X_AXIS] *= dir;
+      off[Y_AXIS] *= Directional_element_interface::get (me);
+      o += off;
     }
 
   /*
@@ -352,8 +359,12 @@ Slur::get_attachment (Grob *me, Direction dir,
        - me->relative_coordinate (common[Y_AXIS], Y_AXIS);
     }
 
-  o += ly_scm2offset (index_cell (me->get_grob_property ("attachment-offset"),
-                                 dir)) * staff_space;
+  Offset off = ly_scm2offset (index_cell (me->get_grob_property
+                                         ("attachment-offset"),
+                                         dir)) * staff_space;
+
+  off[Y_AXIS] *= Directional_element_interface::get (me);
+  o += off;
   return o;
 }
 
@@ -380,8 +391,12 @@ Slur::encompass_offset (Grob*me,
   /*
     Simply set x to middle of notehead
    */
-
-  o[X_AXIS] -= 0.5 * stem_dir * col->extent (col,X_AXIS).length ();
+  Real x_extent;
+  if (Grob *head = Note_column::first_head (col))
+    x_extent = head->extent (head, X_AXIS).length ();
+  else
+    x_extent = col->extent (col, X_AXIS).length ();
+  o[X_AXIS] -= 0.5 * stem_dir * x_extent;
 
   if ((stem_dir == dir)
       && !stem_l->extent (stem_l, Y_AXIS).empty_b ())
index 5fa998727dd151daa881e4560c1ef6490d3e21c6..058ffdd2c7391cecd9be980ee281c20d502b564f 100644 (file)
@@ -44,6 +44,20 @@ scriptBoth = {
   \property Voice.Script \revert #'direction
 }
 
+tupletUp  = {
+  \property Voice.TupletBracket \override #'direction = #1
+  \property Voice.TupletBracket \override #'direction = #1
+}
+tupletDown = {
+  \property Voice.TupletBracket \override #'direction = #-1
+  \property Voice.TupletBracket \override #'direction = #-1
+}
+tupletBoth = {
+  \property Voice.TupletBracket \revert #'direction
+  \property Voice.TupletBracket \revert #'direction
+}
+
+
 
 cadenzaOn = \property Score.timing = ##f
 cadenzaOff = {
index abfa9e2a89f92831093483e72ad4b72a3fd38a63..28d1eb0cf12a38143cecca50cdf880fbe5f62b15 100644 (file)
 (define default-slur-extremity-offset-alist
   '(
     ((head 1 1) . (-0.25 . 0.25))
-    ((head 1 -1) . (-0.25 . -0.25))
+    ((head 1 -1) . (-0.25 . 0.25))
     ((head -1 1) . (-0.25 . 0.25))
-    ((head -1 -1) . (-0.85 . -0.25))
+    ((head -1 -1) . (-0.85 . 0.25))
 
     ((stem 1 1) . (0 . 0.5))
-    ((stem -1 -1) . (0 . -0.5))
+    ((stem -1 -1) . (0 . 0.5))
 
     ((loose-end 1 1) . (-0.4 . 0))
     ((loose-end 1 -1) . (-0.4 . 0))
 (define default-phrasing-slur-extremity-offset-alist
   '(
     ((head 1 1) . (-0.25 . 1.25))
-    ((head 1 -1) . (-0.25 . -1.25))
+    ((head 1 -1) . (-0.25 . 1.25))
     ((head -1 1) . (-0.25 . 1.25))
-    ((head -1 -1) . (-0.85 . -1.25))
+    ((head -1 -1) . (-0.85 . 1.25))
 
     ((stem 1 1) . (0 . 1.5))
-    ((stem -1 -1) . (0 . -1.5))
+    ((stem -1 -1) . (0 . 1.5))
 
     ((loose-end 1 1) . (-0.4 . 0))
     ((loose-end 1 -1) . (-0.4 . 0))
index c4e0619901c52c2c3cc22ce0d4e8c797940189da..6209e86e8bb77c15fca7b4d658c853defb19010a 100644 (file)
@@ -777,7 +777,7 @@ if 1:
 
 if 1:
        def conv (str):
-               str = re.sub ('([Cc])horda', '\\1orda', str)
+               str = re.sub ('([Cc])hord([ea])', '\\1ord\\2', str)
                return str
        
        conversions.append (((1,3,144), conv, 'Chorda -> Corda'))