Reviewers: xratamacue_hotmail.com, reinhold_kainhofer.com,

Message:
Passes regtests.

Description:
modifying default behaviour of tremolo slashes

It turned out that tremolo slashes should have
quite constant slope (definately not depending
on beam slope), so i change that. I also changed
slash style so that it isn't rectangle in any
cases by dafault.

Please review this at http://codereview.appspot.com/4636081/

Affected files:
  M lily/stem-tremolo.cc


Index: lily/stem-tremolo.cc
diff --git a/lily/stem-tremolo.cc b/lily/stem-tremolo.cc
index 4d1678889a63ee382a4a207bf5d31fd2424194f2..2163f08bca4737b1cd1fbdb631471d0b823e84e5 100644
--- a/lily/stem-tremolo.cc
+++ b/lily/stem-tremolo.cc
@@ -37,6 +37,10 @@ Stem_tremolo::calc_slope (SCM smob)
   Grob *stem = unsmob_grob (me->get_object ("stem"));
   Spanner *beam = Stem::get_beam (stem);

+  /* We used to have tremolo slashes angled exactly like beams
+     (if the note had a beam), but it turned out
+     that it's not proper notation.
+
   if (beam)
     {
       Real dy = 0;
@@ -54,11 +58,13 @@ Stem_tremolo::calc_slope (SCM smob)
       return scm_from_double (dx ? dy / dx : 0);
     }
   else
-    /* down stems with flags should have more sloped trems (helps avoid
-       flag/stem collisions without making the stem very long) */
-    return scm_from_double (
- (Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN) ?
-          0.40 : 0.25);
+  */
+
+  /* down stems with flags should have more sloped trems (helps avoid
+     flag/stem collisions without making the stem very long) */
+  return scm_from_double (
+ (Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN) ?
+    0.40 : 0.25);
 }

 MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_width, 1)
@@ -79,6 +85,10 @@ MAKE_SCHEME_CALLBACK (Stem_tremolo, calc_style, 1)
 SCM
 Stem_tremolo::calc_style (SCM smob)
 {
+  /* We used to use rectangle tremolo style for beamed notes
+     and flagged upstem notes, but it looks like it shouldn't
+     be done that way.
+
   Grob *me = unsmob_grob (smob);
   Grob *stem = unsmob_grob (me->get_object ("stem"));
   Direction stemdir = get_grob_direction (stem);
@@ -86,6 +96,9 @@ Stem_tremolo::calc_style (SCM smob)
   bool flag = Stem::duration_log (stem) >= 3 && !beam;

return ly_symbol2scm (((stemdir == UP && flag) || beam) ? "rectangle" : "default");
+  */
+
+  return ly_symbol2scm ("default");
 }

 Real



_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to