[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
modifying default behaviour of tremolo slashes (issue4636081)
From: |
lemniskata . bernoullego |
Subject: |
modifying default behaviour of tremolo slashes (issue4636081) |
Date: |
Mon, 04 Jul 2011 19:26:04 +0000 |
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
- modifying default behaviour of tremolo slashes (issue4636081),
lemniskata . bernoullego <=
- Re: modifying default behaviour of tremolo slashes (issue4636081), Carl . D . Sorensen, 2011/07/04
- Re: modifying default behaviour of tremolo slashes (issue4636081), n . puttock, 2011/07/04
- Re: modifying default behaviour of tremolo slashes (issue4636081), joeneeman, 2011/07/11
- Re: modifying default behaviour of tremolo slashes (issue4636081), lemniskata . bernoullego, 2011/07/17
- Re: modifying default behaviour of tremolo slashes (issue4636081), pkx166h, 2011/07/18
- Re: modifying default behaviour of tremolo slashes (issue4636081), pkx166h, 2011/07/19