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

Issue 13582046: Checks to see if tuplet brackets have bounds (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by MikeSol
Modified:
10 years, 4 months ago
Reviewers:
Keith, dak, mike7, Trevor Daniels
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Checks to see if tuplet brackets have bounds

Patch Set 1 #

Total comments: 1

Patch Set 2 : Response to David's comments #

Patch Set 3 : Adds check in cross-staff function before programming error #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -3 lines) Patch
M lily/tuplet-bracket.cc View 1 2 2 chunks +23 lines, -3 lines 1 comment Download

Messages

Total messages: 8
dak
https://codereview.appspot.com/13582046/diff/1/lily/tuplet-bracket.cc File lily/tuplet-bracket.cc (right): https://codereview.appspot.com/13582046/diff/1/lily/tuplet-bracket.cc#newcode99 lily/tuplet-bracket.cc:99: if (!left || !right) Too many combinatorics involved unnecessarily. ...
10 years, 7 months ago (2013-09-13 06:41:00 UTC) #1
mike7
On 13 sept. 2013, at 08:41, dak@gnu.org wrote: > > https://codereview.appspot.com/13582046/diff/1/lily/tuplet-bracket.cc > File lily/tuplet-bracket.cc (right): ...
10 years, 7 months ago (2013-09-13 07:09:44 UTC) #2
MikeSol
Response to David's comments
10 years, 7 months ago (2013-09-13 07:11:05 UTC) #3
Trevor Daniels
On 2013/09/13 07:09:44, mike7 wrote: > With respect to your point about null pointers and ...
10 years, 7 months ago (2013-09-13 08:41:42 UTC) #4
dak
On 2013/09/13 08:41:42, Trevor Daniels wrote: > On 2013/09/13 07:09:44, mike7 wrote: > > > ...
10 years, 7 months ago (2013-09-13 09:00:35 UTC) #5
mike7
On 13 sept. 2013, at 11:00, dak@gnu.org wrote: > On 2013/09/13 08:41:42, Trevor Daniels wrote: ...
10 years, 7 months ago (2013-09-13 10:10:57 UTC) #6
MikeSol
Adds check in cross-staff function before programming error
10 years, 7 months ago (2013-09-13 10:17:18 UTC) #7
Keith
10 years, 7 months ago (2013-09-13 20:12:35 UTC) #8
The first two patches look good.

Defensive checks for null pointers are a good thing.
We do not want a bracket for the input in the bug-report. 
We want a message when our .ly input asks for a tuplet bracket that cannot be
printed, and we get such a message (just before a crash, without this patch).

Maybe "warning" would be more appropriate than "programming error" as the
message in tuplet-engraver.cc, since LilyPond allows both the input in the bug
report and this variant where we want, and get, a bracket:
  \new Voice << {
    %%% \once\override Voice.TupletBracket #'cross-staff = ##f
    \times 2/3 { s8 s8 s8 } r2. }
    { b8*2/3 b b } >>

If there are no bounds to attach the bracket to, it would make sense to skip the
creation of the TupletBracket with a continue; statement after the error message
in tuplet-engraver.cc

https://codereview.appspot.com/13582046/diff/11001/lily/tuplet-bracket.cc
File lily/tuplet-bracket.cc (right):

https://codereview.appspot.com/13582046/diff/11001/lily/tuplet-bracket.cc#new...
lily/tuplet-bracket.cc:809: 
Why check the bounds here? 
We certainly don't want to check break_status_dir() here.

Conceptually, the (line-broken) tuplet /could/ end on a line-break, but still be
cross-staff.
In fact, the first time cross-staff is called is now before line-breaking, so
break_status_dir() is 0, and the value of cross-staff is stored in the property
so it need not be called again.

Now that there is no more pure-relevant filter, adjacent_pure_heights() should
probably use the get_pure_property() method of checking cross-staff, omitting
object for which cross-staff is true or non-boolean (a.k.a. "don't know yet").
Sign in to reply to this message.

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