]> git.donarmstrong.com Git - lilypond.git/commitdiff
*** empty log message ***
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 30 Mar 2006 10:33:12 +0000 (10:33 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Thu, 30 Mar 2006 10:33:12 +0000 (10:33 +0000)
ChangeLog
THANKS
input/regression/stem-tremolo.ly
lily/stem-tremolo.cc

index 041f45732f51d6eef92fe02fb97778a71f96f4b0..b5c080d99a038e502db751db6c39537525293609 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-03-30  Joe Neeman  <joeneeman@gmail.com>
+
+       * lily/stem-tremolo.cc (print): for whole notes (and breves, etc.)
+       position the tremolo based on the position of the notehead.
+
+       * input/regression/stem-tremolo.ly: add example of unbeamed eighth
+       notes and update the texidoc line with the new positioning rules.
+       
 2006-03-30  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
        * lily/ttf.cc (print_trailer): don't always use uXXX glyphname.
        * scm/music-functions.scm: Make phrasing slurs follow voice direction
 
        * scripts/lilypond-book.py: Introduce option
-        --preserve-line-breaks, for usage with srcltx
+           --preserve-line-breaks, for usage with srcltx
 
 2005-12-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * ly/init.ly:
        * scm/lily-library.scm (print-score-with-defaults): renamed
        $globalheader to $defaultheader
-        
+           
        * Documentation/user/global.itely (Creating titles): added short
        explanation that multiple headers are useable.
 
 
        * ly/property-init.ly: Added tieDashed.
 
-        * THANKS: Added some bughunters for 2.5.
+       * THANKS: Added some bughunters for 2.5.
 
 2005-06-09  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
 
 2005-05-11  Heikki Junes  <hjunes@cc.hut.fi>
 
-        * Documentation/topdocs/{AUTHORS.texi,INSTALL.texi,README.texi}:
-        Specify `@documentencoding utf-8' for html, ignore warnings.
+       * Documentation/topdocs/{AUTHORS.texi,INSTALL.texi,README.texi}:
+       Specify `@documentencoding utf-8' for html, ignore warnings.
 
 2005-05-11  Erik Sandberg  <ersa9195@student.uu.se>
 
diff --git a/THANKS b/THANKS
index f6551fb4929157f07c0136dc5c79998fdca80925..0a1c4ec1698ad63943f8691469ac79ed3b395b80 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -12,6 +12,7 @@ Mats Bengtsson    - Support Guru
 
 CONTRIBUTORS
 
+Joe Neeman
 
 SPONSORS
 
@@ -27,6 +28,8 @@ Juergen Reuter
 BUG HUNTERS/SUGGESTIONS
 
 J. Leung
+Orm Finnendahl
+Stephen Carter
 Werner Lemberg
 
 
index 738649dda44db34a71565a96bd40f2c90a923fc6..6cc2729daf5bb064f4a68458962dc82aedd2bafd 100644 (file)
@@ -5,7 +5,13 @@
 Stem tremolos or rolls are tremolo signs that look like beam segments
 crossing stems.  If the stem is in a beam, the tremolo must be parallel
 to the beam.  If the stem is invisible (e.g. on a whole note), the
-tremolo must be centered on the note.
+tremolo must be centered on the note. If the note has a flag (eg. an
+unbeamed 8th note), the tremolo should be shortened if the stem is up
+and tilted extra if the stem is down.
+
+The tremolos should be positioned a fixed distance from the end of the
+stems unless there is no stem, in which case they should be positioned
+a fixed distance from the note head.
 "
 }
 
@@ -27,7 +33,7 @@ tremolo must be centered on the note.
   c,16:32 c: c c a16:32 a: a a
   c8:16 g: d: a:
   c8:32 f: b: e:
-  \transpose c c { f''8:256[ f'8: f'':] }
+  f8:256[ f,8: f':] f: \noBeam f,,: \noBeam c16:32 \noBeam c'':
 }
 
 
index 05de18bab7af64119ebba7ff9961209b77354030..b3ea13d30d1f0fac3992b4ae9391e10b76e9f99f 100644 (file)
@@ -175,6 +175,7 @@ Stem_tremolo::print (SCM grob)
 
   Spanner *beam = Stem::get_beam (stem);
   Direction stemdir = get_grob_direction (stem);
+  bool whole_note = Stem::duration_log (stem) <= 0;
   if (stemdir == 0)
     stemdir = UP;
 
@@ -183,8 +184,11 @@ Stem_tremolo::print (SCM grob)
     ? Beam::get_beam_translation (beam)
     : 0.81;
 
+  /* for a whole note, we position relative to the notehead, so we want the
+     stencil aligned on the flag closest to the head */
+  Direction stencil_dir = whole_note ? -stemdir : stemdir;
   Stencil mol = raw_stencil (me, robust_scm2double (me->get_property ("slope"),
-                                                   0.25), stemdir);
+                                                   0.25), stencil_dir);
 
   Interval mol_ext = mol.extent (Y_AXIS);
   Real ss = Staff_symbol_referencer::staff_space (me);
@@ -207,6 +211,14 @@ Stem_tremolo::print (SCM grob)
       if (stemdir == UP)
         end_y -= stemdir * beam_translation * 0.5;
     }
+  if (whole_note)
+    {
+      /* we shouldn't position relative to the end of the stem since the stem
+         is invisible */
+      vector<int> nhp = Stem::note_head_positions (stem);
+      Real note_head = (stemdir == UP ? nhp.back () : nhp[0]);
+      end_y = note_head + stemdir * 2.0;
+    }
   mol.translate_axis (end_y, Y_AXIS);
 
   return mol.smobbed_copy ();