Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14194)

Issue 562550043: Add a procedure to add slashes to Beams and straight Flags

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 1 month ago by thomasmorley651
Modified:
5 years, 1 month ago
Reviewers:
Valentin Villenave, Carl, Malte Meyn, carl.d.sorensen
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Add a procedure to add slashes to Beams and straight Flags Adds procedure slash-stencil to stencil.scm Replaces add-stroke-straight from flag-styles.scm with slash-stencil. Amends defs in grace-init.ly with slashedBeam. Amends Beam.details. Creates Flag.details. Documentation and regtest.

Patch Set 1 #

Patch Set 2 : Oversights #

Patch Set 3 : Better deal with changed fontsizes #

Patch Set 4 : correct changes.tely #

Patch Set 5 : Improve some doc-strings #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+414 lines, -48 lines) Patch
M Documentation/changes.tely View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M Documentation/notation/rhythms.itely View 1 1 chunk +1 line, -9 lines 0 comments Download
A + Documentation/snippets/new/redefining-grace-note-global-defaults.ly View 2 chunks +3 lines, -7 lines 0 comments Download
A input/regression/slashed-beams-and-straight-flags.ly View 1 chunk +139 lines, -0 lines 0 comments Download
M lily/beam.cc View 1 2 3 4 1 chunk +11 lines, -0 lines 0 comments Download
M lily/flag.cc View 1 2 3 4 1 chunk +19 lines, -2 lines 0 comments Download
M ly/grace-init.ly View 1 chunk +4 lines, -0 lines 1 comment Download
M ly/property-init.ly View 1 chunk +7 lines, -0 lines 0 comments Download
M scm/define-grobs.scm View 2 chunks +13 lines, -1 line 8 comments Download
M scm/flag-styles.scm View 2 chunks +6 lines, -29 lines 0 comments Download
M scm/stencil.scm View 1 2 1 chunk +206 lines, -0 lines 0 comments Download

Messages

Total messages: 12
thomasmorley651
Please review
5 years, 1 month ago (2019-03-10 13:13:51 UTC) #1
thomasmorley651
Oversights
5 years, 1 month ago (2019-03-10 13:37:42 UTC) #2
thomasmorley651
Better deal with changed fontsizes
5 years, 1 month ago (2019-03-10 17:07:07 UTC) #3
Valentin Villenave
On 2019/03/10 13:37:42, thomasmorley651 wrote: > Oversights Greetings Harm, looks good; much better than the ...
5 years, 1 month ago (2019-03-10 17:08:33 UTC) #4
thomasmorley651
On 2019/03/10 17:08:33, Valentin Villenave wrote: > On 2019/03/10 13:37:42, thomasmorley651 wrote: > > Oversights ...
5 years, 1 month ago (2019-03-10 18:02:04 UTC) #5
thomasmorley651
correct changes.tely
5 years, 1 month ago (2019-03-10 19:26:26 UTC) #6
Carl
LGTM
5 years, 1 month ago (2019-03-11 01:21:25 UTC) #7
thomasmorley651
Improve some doc-strings
5 years, 1 month ago (2019-03-11 23:11:49 UTC) #8
Malte Meyn
Here’s some test music: \version "2.21.0" \language "deutsch" \relative { %%% looks better than 1/1 ...
5 years, 1 month ago (2019-03-16 20:42:12 UTC) #9
Malte Meyn
On 2019/03/16 20:42:12, Malte Meyn wrote: > It’s not that easy in some cases, see ...
5 years, 1 month ago (2019-03-16 20:42:42 UTC) #10
Malte Meyn
another small remark https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm File scm/define-grobs.scm (right): https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm#newcode409 scm/define-grobs.scm:409: (slash-gradient . (1 . 2)) On ...
5 years, 1 month ago (2019-03-16 20:44:19 UTC) #11
thomasmorley651
5 years, 1 month ago (2019-03-17 10:29:59 UTC) #12
Hi Malte,

thanks for review.

Currently I follow a different route: create a Slash-grob.
Once it is mature I'll publish a concurrent patch-set in a different issue.
For now I'll set this one back to 'needs-work'.
However you spotted some valid points, which I'll likely have to take into
account for a possible Slash.stencil as well.

https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm
File scm/define-grobs.scm (right):

https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm#...
scm/define-grobs.scm:408: (slash-stem-part . 1)
On 2019/03/16 20:42:11, Malte Meyn wrote:
> It’s not that easy in some cases, see example code below.

Yep, it's quite impossible to find a fixed default number-value which looks nice
in all cases, thus I made it a overridable (sub-)property.
Should I try to find some procedure looking at the actual stem-length and set
slash-stem-part accordingly?
Wouldn't it be over-engineered?

https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm#...
scm/define-grobs.scm:409: (slash-gradient . (1 . 2))
On 2019/03/16 20:44:19, Malte Meyn wrote:
> On 2019/03/16 20:42:11, Malte Meyn wrote:
> > IMHO that’s to steep, I’d prefer something like '(3 . 4)
> 
> Also, wouldn’t it be simpler (for the user) to use a number here instead of a
> pair? #3/4 or 0.75 instead of #'(3 . 4)

This is one of the TODO's in 'slash-stencil'.
Possible would be pair, fraction, number or even an angle.
I'd love to read more opinions about it.

https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm#...
scm/define-grobs.scm:409: (slash-gradient . (1 . 2))
On 2019/03/16 20:42:11, Malte Meyn wrote:
> IMHO that’s to steep, I’d prefer something like '(3 . 4)

Well, a matter of taste I'd say. The slash for beams needs to be more steep in
most cases (compared to slashed default-flags).
I'll take your suggestion and do some tests.

https://codereview.appspot.com/562550043/diff/564540043/scm/define-grobs.scm#...
scm/define-grobs.scm:410: (slash-x-y-over-shoot . (0.4 . 0.8))
On 2019/03/16 20:42:11, Malte Meyn wrote:
> I don’t really understand how this works: Why does one need a so much larger y
> value? The result doesn’t look like the slash sticks out further at the top
than
> at the left side.

The x-value does not need to look at beam's gradient as opposed to the y-value.
Tbh, I didn't care much about this problem after finding some working code.
Though, you stumbled across it and maybe you will not be the only one. I'll look
how to improve it.
> 
> Also, that’s a really complicated name, how about something simpler (maybe
> slash-overshoot)?

I'll delete the dash in 'over-shoot' according to the existing 'break-overshoot'
Though, looking at other related properties like the already mentioned
'break-overshoot' or 'shorten-pair', those pairs always work in one axis'
direction. I wanted to make clear those values serve different directions.
Again, I'd love to hear more opinions.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b