Re: Sketch for in-notes. (issue 5293053)
On 2011/10/28 13:26:22, mike_apollinemike.com wrote: On Oct 28, 2011, at 3:24 PM, mailto:n.putt...@gmail.com wrote: http://codereview.appspot.com/5293053/diff/11005/input/regression/footnote-break-visibility.ly File input/regression/footnote-break-visibility.ly (left): http://codereview.appspot.com/5293053/diff/11005/input/regression/footnote-break-visibility.ly#oldcode1 input/regression/footnote-break-visibility.ly:1: \version 2.14.0 2.15.17 http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly File input/regression/in-note.ly (right): http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode1 input/regression/in-note.ly:1: \version 2.15.15 2.15.17 http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode5 input/regression/in-note.ly:5: be above or below the staff via the paper variable @code{in note direction} You reference these properties without testing them (and the first is missing hyphens). http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode6 input/regression/in-note.ly:6: and spaced via the variable @{in-note-padding}. code@{in-note-padding} http://codereview.appspot.com/5293053/diff/11005/lily/constrained-breaking.cc File lily/constrained-breaking.cc (right): http://codereview.appspot.com/5293053/diff/11005/lily/constrained-breaking.cc#newcode561 lily/constrained-breaking.cc:561: programming_error (expecting stencil, got empty pointer); if you get a null pointer, you can't dereference it in the next line http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc File lily/page-layout-problem.cc (left): http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc#oldcode72 lily/page-layout-problem.cc:72: itself be comprised of several footnotes. may itself comprise several http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc#newcode88 lily/page-layout-problem.cc:88: programming_error (Footnotes must be added to lines before they're retrieved.); they are http://codereview.appspot.com/5293053/diff/11005/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/5293053/diff/11005/scm/define-grob-properties.scm#newcode1043 scm/define-grob-properties.scm:1043: (in-note-padding ,number? Padding between in notes.) in-notes http://codereview.appspot.com/5293053/diff/11005/scm/paper-system.scm File scm/paper-system.scm (right): http://codereview.appspot.com/5293053/diff/11005/scm/paper-system.scm#newcode38 scm/paper-system.scm:38: (let* ((main-stencil (ly:prob-property system 'stencil)) let Hey Neil, You caught the patch post-push. I'll incorporate these comments into a new patch and post it to the list w/in the next 72ish hours. In general, I have no problem holding off on pushing something if you send me a note saying I'll have time in X # of days to give comments - please wait. Cheers, MS Patch has been backed out. It broke the documentation build this morning. And it broke the documentation build with a line that Neil has already pointed out yesterday at noon. It is not that this particular mistake was unheard of. Since this kept the second in unfriendliness from accepting a patch series from the most unfriendly developer, consider the remarks to be expected as having been made. I have not checked in this particular instance, but in my experience make doc-clean info detects most documentation building failures while appearing somewhat faster than a web build. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
On Oct 29, 2011, at 9:00 AM, d...@gnu.org wrote: Patch has been backed out. It broke the documentation build this morning. And it broke the documentation build with a line that Neil has already pointed out yesterday at noon. It is not that this particular mistake was unheard of. Since this kept the second in unfriendliness from accepting a patch series from the most unfriendly developer, consider the remarks to be expected as having been made. I have not checked in this particular instance, but in my experience make doc-clean info detects most documentation building failures while appearing somewhat faster than a web build. http://codereview.appspot.com/5293053/ New patch set uploaded. Cheers, MS ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
http://codereview.appspot.com/5293053/diff/11005/input/regression/footnote-break-visibility.ly File input/regression/footnote-break-visibility.ly (left): http://codereview.appspot.com/5293053/diff/11005/input/regression/footnote-break-visibility.ly#oldcode1 input/regression/footnote-break-visibility.ly:1: \version 2.14.0 2.15.17 http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly File input/regression/in-note.ly (right): http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode1 input/regression/in-note.ly:1: \version 2.15.15 2.15.17 http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode5 input/regression/in-note.ly:5: be above or below the staff via the paper variable @code{in note direction} You reference these properties without testing them (and the first is missing hyphens). http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode6 input/regression/in-note.ly:6: and spaced via the variable @{in-note-padding}. code@{in-note-padding} http://codereview.appspot.com/5293053/diff/11005/lily/constrained-breaking.cc File lily/constrained-breaking.cc (right): http://codereview.appspot.com/5293053/diff/11005/lily/constrained-breaking.cc#newcode561 lily/constrained-breaking.cc:561: programming_error (expecting stencil, got empty pointer); if you get a null pointer, you can't dereference it in the next line http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc File lily/page-layout-problem.cc (left): http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc#oldcode72 lily/page-layout-problem.cc:72: itself be comprised of several footnotes. may itself comprise several http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc#newcode88 lily/page-layout-problem.cc:88: programming_error (Footnotes must be added to lines before they're retrieved.); they are http://codereview.appspot.com/5293053/diff/11005/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/5293053/diff/11005/scm/define-grob-properties.scm#newcode1043 scm/define-grob-properties.scm:1043: (in-note-padding ,number? Padding between in notes.) in-notes http://codereview.appspot.com/5293053/diff/11005/scm/paper-system.scm File scm/paper-system.scm (right): http://codereview.appspot.com/5293053/diff/11005/scm/paper-system.scm#newcode38 scm/paper-system.scm:38: (let* ((main-stencil (ly:prob-property system 'stencil)) let http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
On Oct 28, 2011, at 3:24 PM, n.putt...@gmail.com wrote: http://codereview.appspot.com/5293053/diff/11005/input/regression/footnote-break-visibility.ly File input/regression/footnote-break-visibility.ly (left): http://codereview.appspot.com/5293053/diff/11005/input/regression/footnote-break-visibility.ly#oldcode1 input/regression/footnote-break-visibility.ly:1: \version 2.14.0 2.15.17 http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly File input/regression/in-note.ly (right): http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode1 input/regression/in-note.ly:1: \version 2.15.15 2.15.17 http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode5 input/regression/in-note.ly:5: be above or below the staff via the paper variable @code{in note direction} You reference these properties without testing them (and the first is missing hyphens). http://codereview.appspot.com/5293053/diff/11005/input/regression/in-note.ly#newcode6 input/regression/in-note.ly:6: and spaced via the variable @{in-note-padding}. code@{in-note-padding} http://codereview.appspot.com/5293053/diff/11005/lily/constrained-breaking.cc File lily/constrained-breaking.cc (right): http://codereview.appspot.com/5293053/diff/11005/lily/constrained-breaking.cc#newcode561 lily/constrained-breaking.cc:561: programming_error (expecting stencil, got empty pointer); if you get a null pointer, you can't dereference it in the next line http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc File lily/page-layout-problem.cc (left): http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc#oldcode72 lily/page-layout-problem.cc:72: itself be comprised of several footnotes. may itself comprise several http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/11005/lily/page-layout-problem.cc#newcode88 lily/page-layout-problem.cc:88: programming_error (Footnotes must be added to lines before they're retrieved.); they are http://codereview.appspot.com/5293053/diff/11005/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/5293053/diff/11005/scm/define-grob-properties.scm#newcode1043 scm/define-grob-properties.scm:1043: (in-note-padding ,number? Padding between in notes.) in-notes http://codereview.appspot.com/5293053/diff/11005/scm/paper-system.scm File scm/paper-system.scm (right): http://codereview.appspot.com/5293053/diff/11005/scm/paper-system.scm#newcode38 scm/paper-system.scm:38: (let* ((main-stencil (ly:prob-property system 'stencil)) let Hey Neil, You caught the patch post-push. I'll incorporate these comments into a new patch and post it to the list w/in the next 72ish hours. In general, I have no problem holding off on pushing something if you send me a note saying I'll have time in X # of days to give comments - please wait. Cheers, MS ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
On Oct 22, 2011, at 1:08 AM, percival.music...@gmail.com wrote: http://codereview.appspot.com/5293053/diff/12001/lily/page-breaking.cc File lily/page-breaking.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-breaking.cc#newcode189 lily/page-breaking.cc:189: old.in_note_heights_.begin (), old.in_note_heights_.end ()); Why are we talking about C++ style? Run it through fix-cc.py. Whatever that produces is ok as far as this patch goes. (if something looks bad, then we can discuss modifying fix-cc.py in some way -- but that's a separate issue from whether we accept this patch or not.) http://codereview.appspot.com/5293053/ Running fix-cc.py, I got: page-layout-problem.cc... Invalid command line option: align-pointer=name For help on options, type 'astyle -h' astyle wasn't in the lilydev Ubuntu, so I used apt-get to get it. Maybe there's a problem with versioning? Cheers, MS ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
On Sat, Oct 22, 2011 at 09:56:16PM +0200, m...@apollinemike.com wrote: Running fix-cc.py, I got: astyle wasn't in the lilydev Ubuntu, so I used apt-get to get it. Maybe there's a problem with versioning? You need version 2.02. It would be nice if the script warned if you had a different version. http://code.google.com/p/lilypond/issues/detail?id=1797 Cheers, - Graham ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
I'm not sure how to deal with some of the déBordage of line lengths - you're right that they're ugly, but I dont' see how to chop them down stay within good code style. Thanks for the review! ~Mike http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc#newcode79 lily/page-layout-problem.cc:79: footnotes_added = g-get_property (footnote-stencil) != SCM_EOL; On 2011/10/21 11:52:25, Bertrand Bordage wrote: footnotes_added = scm_is_pair (g-get_property (footnote-stencil)); Would this work? footnote-stencil's value is a stencil (not a list), so would it come up true in scm_is_pair ? http://codereview.appspot.com/5293053/diff/12001/lily/page-spacing.cc File lily/page-spacing.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-spacing.cc#newcode76 lily/page-spacing.cc:76: bool has_in_notes; On 2011/10/21 11:52:25, Bertrand Bordage wrote: Shouldn't it be has_in_notes_ (with an underscore at the end)? has_footnotes_ should be defined here too. Nein, as this is internal to the function (because in_notes only matter on a line to line basis) whereas has_footnotes_ is valid for the whole page. http://codereview.appspot.com/5293053/diff/12001/lily/page-spacing.cc#newcode79 lily/page-spacing.cc:79: in_note_height += (has_in_notes On 2011/10/21 11:52:25, Bertrand Bordage wrote: What is the default value of an unset boolean? I mean: the first time, is it adding 0.0 or breaker_-in_note_padding()? unset_boolean = stupid_programmer http://codereview.appspot.com/5293053/diff/12001/lily/system.cc File lily/system.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/system.cc#newcode298 lily/system.cc:298: System::internal_get_note_heights_in_range (vsize start, vsize end, bool foot) On 2011/10/21 11:52:25, Bertrand Bordage wrote: Ugh... A boolean to tell if we're in a footnote or in an in-note... Why the ugh? http://codereview.appspot.com/5293053/diff/12001/lily/system.cc#newcode305 lily/system.cc:305: if (foot ? !to_boolean (footnote_grobs[i]-get_property (footnote)) : to_boolean (footnote_grobs[i]-get_property (footnote))) On 2011/10/21 11:52:25, Bertrand Bordage wrote: Line length. Plus, I don't really understand what's the use of this. It keeps either footnotes or in-notes depending on what we want. http://codereview.appspot.com/5293053/diff/12001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/5293053/diff/12001/scm/define-grob-properties.scm#newcode299 scm/define-grob-properties.scm:299: (footnote ,boolean? Should this be a footnote or in-note?) On 2011/10/21 11:52:25, Bertrand Bordage wrote: Again, this is really ugly. Perhaps a 'style property instead? For now, I have it as a boolean because it could only be one of two things. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc#newcode79 lily/page-layout-problem.cc:79: footnotes_added = g-get_property (footnote-stencil) != SCM_EOL; Of course not :o$ I recommend to_boolean. It returns true for everything except SCM_EOL and SCM_BOOL_F. http://codereview.appspot.com/5293053/diff/12001/lily/system.cc File lily/system.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/system.cc#newcode298 lily/system.cc:298: System::internal_get_note_heights_in_range (vsize start, vsize end, bool foot) I wanted to express my disgust. Not the french Ugh that could refer to your amerindian origins :) http://codereview.appspot.com/5293053/diff/12001/lily/system.cc#newcode305 lily/system.cc:305: if (foot ? !to_boolean (footnote_grobs[i]-get_property (footnote)) : to_boolean (footnote_grobs[i]-get_property (footnote))) Ok. I thought footnote_grobs was only using footnotes. Maybe you should change the names of footnote_grobs and get_footnote_grobs_in_range? And change this long line for: if (!to_boolean (footnote_grobs[i]-get_property (footnote))) http://codereview.appspot.com/5293053/diff/12001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/5293053/diff/12001/scm/define-grob-properties.scm#newcode299 scm/define-grob-properties.scm:299: (footnote ,boolean? Should this be a footnote or in-note?) Something like that. I think style implicitly stands for musical notation style, so we need to find something better. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
A small comment to show you a possible solution for the indentation. This can be apply at every line length comment. http://codereview.appspot.com/5293053/diff/12001/lily/page-breaking.cc File lily/page-breaking.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-breaking.cc#newcode189 lily/page-breaking.cc:189: old.in_note_heights_.begin (), old.in_note_heights_.end ()); I'm not sure, but maybe: compressed.footnote_heights_.insert (compressed.footnote_heights_.begin (), old.footnote_heights_.begin (), old.footnote_heights_.end ()); http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
http://codereview.appspot.com/5293053/diff/12001/lily/page-breaking.cc File lily/page-breaking.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-breaking.cc#newcode189 lily/page-breaking.cc:189: old.in_note_heights_.begin (), old.in_note_heights_.end ()); Why are we talking about C++ style? Run it through fix-cc.py. Whatever that produces is ok as far as this patch goes. (if something looks bad, then we can discuss modifying fix-cc.py in some way -- but that's a separate issue from whether we accept this patch or not.) http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc#newcode79 lily/page-layout-problem.cc:79: footnotes_added = g-get_property (footnote-stencil) != SCM_EOL; On 2011/10/21 20:07:37, Bertrand Bordage wrote: Of course not :o$ I recommend to_boolean. It returns true for everything except SCM_EOL and SCM_BOOL_F. Don't do this. to_boolean should only be used with properties which are booleans. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc File lily/page-layout-problem.cc (right): http://codereview.appspot.com/5293053/diff/12001/lily/page-layout-problem.cc#newcode79 lily/page-layout-problem.cc:79: footnotes_added = g-get_property (footnote-stencil) != SCM_EOL; On 2011/10/21 20:07:37, Bertrand Bordage wrote: Of course not :o$ I recommend to_boolean. It returns true for everything except SCM_EOL and SCM_BOOL_F. Since when? It returns true for SCM_BOOL_T and nothing else. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
Sorry for this total mistake. !ly_is_equal (..., SCM_EOL) should do it, then. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
On 2011/10/21 23:49:26, Bertrand Bordage wrote: Sorry for this total mistake. !ly_is_equal (..., SCM_EOL) should do it, then. It is pretty pointless to use ly_is_equal instead of scm_is_eq on SCM_EOL, and !scm_is_null (...) is prettier anyway. http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Sketch for in-notes. (issue 5293053)
Reviewers: , Message: Hey all, As part of project markup at the suggestion of Nicolas Sceaux by way of Valentin's opera, I've implemented in-notes in LilyPond. These notes hover above systems and come up a fair bit in vocal music. It works, but I have one major and one semi-major snag that I'd like to run by people. Please don't run the regtests on this yet until these snags are worked out. Semi-major-snag: get_footnotes_from_lines should only ever be called once and should stash its results in the systems and/or probs. I'll figure out how to do this in the near future. Major snag. On about 1 out of every 5 runs of this patch, it leads to way-too-big spacing. This is because the stencils of in notes are, for some reason, registering infinite extents in page-spacing.cc when they're being counted (check account_for_footnotes and you'll see that the value of the extent for in_notes is occasionally really really really large). This is strange because when the in_notes are added to the breaker (System::get_in_notes_in_range), these extents are correct. I think it is an issue with pointers and garbage collection of stencils - does anyone have any intuition about this. Here's a test file: \version 2.15.15 \header { texidoc = LilyPond does in-notes. The positioning of these notes can be above or below the staff via the paper variable @code{in note direction} and spaced via the variable @{in-note-padding}. } \relative c' { \repeat unfold 5 { \repeat unfold 20 { a\ b c d\! } % activates the in-note \once \override FootnoteItem #'footnote = ##f \footnoteGrob #'NoteHead #'(0 . 0) \markup { \box \fill-line { this is a test this is a test } } a b c d \repeat unfold 20 { a b c d } \autoFootnoteGrob #'NoteHead #'(-1 . 1) foo bar foo bar a b c d \repeat unfold 20 { a\ b c d\! } } } Description: Sketch for in-notes. Please review this at http://codereview.appspot.com/5293053/ Affected files: M lily/constrained-breaking.cc M lily/include/constrained-breaking.hh M lily/include/page-breaking.hh M lily/include/page-layout-problem.hh M lily/include/system.hh M lily/page-breaking.cc M lily/page-layout-problem.cc M lily/page-spacing.cc M lily/system.cc M scm/define-grob-interfaces.scm M scm/define-grob-properties.scm M scm/define-grobs.scm M scm/paper-system.scm ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
The memory management issue is now fixed. A new patch will be coming down the pipe in 2-3 hours with a regtest. Cheers, MS http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: Sketch for in-notes. (issue 5293053)
Hey all, The patch is now ready to be tested - I got a clean bill of health from the regtests. Cheers, MS http://codereview.appspot.com/5293053/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel