Re: rewrite Self_alignment_interface (issue 7768043)
Code not tested or even eye-balled. https://codereview.appspot.com/7768043/diff/76001/input/regression/text-spanner-attachment-alignment.ly File input/regression/text-spanner-attachment-alignment.ly (right): https://codereview.appspot.com/7768043/diff/76001/input/regression/text-spanner-attachment-alignment.ly#newcode21 input/regression/text-spanner-attachment-alignment.ly:21: \repeat unfold 2 {c'4 _ \markup { FAT } } What does (1 . -1) do? I saw nothing in any of the commit messages about changing the user interface (but they are so long maybe I missed it) https://codereview.appspot.com/7768043/diff/76001/input/regression/unassociated-lyrics-alignment.ly File input/regression/unassociated-lyrics-alignment.ly (right): https://codereview.appspot.com/7768043/diff/76001/input/regression/unassociated-lyrics-alignment.ly#newcode12 input/regression/unassociated-lyrics-alignment.ly:12: \new Lyrics { \lyricmode { foo2 bar aaa1 mmm1 } } I see the durations on the syllables are the same as those on the notes. What happens if they differ? In particular if a syllable is placed between two notes? https://codereview.appspot.com/7768043/diff/76001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): https://codereview.appspot.com/7768043/diff/76001/scm/define-grob-properties.scm#newcode807 scm/define-grob-properties.scm:807: @code{'(-1 . 1)} will result in grobs' left edge being aligned to OK, I understand now. https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
Thanks for the review! On 2013/04/03 17:12:14, Trevor Daniels wrote: Code not tested or even eye-balled. If you're considering eye-balling it, i strongly recommend viewing it in a branch (dev/janek-alignment) - hopefully commit descriptions will help understand respective changes in the code. https://codereview.appspot.com/7768043/diff/76001/input/regression/unassociated-lyrics-alignment.ly File input/regression/unassociated-lyrics-alignment.ly (right): https://codereview.appspot.com/7768043/diff/76001/input/regression/unassociated-lyrics-alignment.ly#newcode12 input/regression/unassociated-lyrics-alignment.ly:12: \new Lyrics { \lyricmode { foo2 bar aaa1 mmm1 } } On 2013/04/03 17:12:14, Trevor Daniels wrote: I see the durations on the syllables are the same as those on the notes. What happens if they differ? In particular if a syllable is placed between two notes? Then the center of the syllable will be aligned to the appropriate point between these notes, much like Dynamics attached to spacer rests: \paper { ragged-right = ##f } { c'4\ c'\! d'\ e'\! f'1 { s4 s4\ s4\ s4\! } } { c'4 c' d' e' f'1 } \new Lyrics \lyricmode { 4 !4 4 !4 \skip4 4 4 !4 } (output attached to tracker issue) Do you think that this should be part of the regtest? https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
On 2013/04/02 21:43:55, janek wrote: simplify things a bit. Oops, sorry, wrong description. This patch is just an intermediate state; it should work (my computer tells there are no unwanted regtest changes), but there will be more changes, for example centered_on_foo will get deleted. Before that i'd like to solve http://lists.gnu.org/archive/html/lilypond-devel/2013-04/msg00010.html - after that things should get a bit cleaner. reviews welcome! Janek https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
Hi all, On Mon, Apr 1, 2013 at 7:52 AM, mts...@gmail.com wrote: I'd recommend adding a sort of padding property to the self-alignment-interface to get it completely there. That is, imagine that we right align to a grob and we want to be padded by 0.1 We should be able to do that. That'd allow self-alignment-interface to be used for grobs like InstrumentName. I think that this should be done by manipulating extents: if i want an InstrumentName to be horizontally-aligned- with-padding, i add desired padding value to its X-extent, and voilà! LilyPond thinks that InstrumentName is slightly bigger, aligns it as if it was slightly bigger, and thus it ends up padded. What do you think? As for chain_offset_callback, i've tried it (see attached patch), but i get a strange error: Processing `input/regression/add-stem-support.ly' Parsing... Interpreting music... Preprocessing graphical objects...ERROR: In procedure ly:self-alignment-interface::x-align-grob: ERROR: Wrong number of arguments to #primitive-procedure ly:self-alignment-interface::x-align-grob quite frankly, i don't know what's wrong. I've looked at other uses of chain_offset_callback and it seems that i've written my code correctly. PS i'll look into Ambitus extent later - right now i'm getting some unexpected regressions after doing some additional modifications. 0001-use-chain-offsets-instead-of-setting-properties.patch Description: Binary data ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
On 1 avr. 2013, at 14:13, Janek Warchoł janek.lilyp...@gmail.com wrote: Hi all, On Mon, Apr 1, 2013 at 7:52 AM, mts...@gmail.com wrote: I'd recommend adding a sort of padding property to the self-alignment-interface to get it completely there. That is, imagine that we right align to a grob and we want to be padded by 0.1 We should be able to do that. That'd allow self-alignment-interface to be used for grobs like InstrumentName. I think that this should be done by manipulating extents: if i want an InstrumentName to be horizontally-aligned- with-padding, i add desired padding value to its X-extent, and voilà! LilyPond thinks that InstrumentName is slightly bigger, aligns it as if it was slightly bigger, and thus it ends up padded. What do you think? X-extent is used in many things other than self alignment positioning, so u don't want to change extents. Every positioning in LilyPond has some notion of padding save this interface. It would be a good addition, but could easily be in a follow-up patch. As for chain_offset_callback, i've tried it (see attached patch), but i get a strange error: Processing `input/regression/add-stem-support.ly' Parsing... Interpreting music... Preprocessing graphical objects...ERROR: In procedure ly:self-alignment-interface::x-align-grob: ERROR: Wrong number of arguments to #primitive-procedure ly:self-alignment-interface::x-align-grob quite frankly, i don't know what's wrong. I've looked at other uses of chain_offset_callback and it seems that i've written my code correctly. I'll look into it when I get home. PS i'll look into Ambitus extent later - right now i'm getting some unexpected regressions after doing some additional modifications. 0001-use-chain-offsets-instead-of-setting-properties.patch ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
On Mon, Apr 1, 2013 at 1:20 PM, m...@mikesolomon.org m...@mikesolomon.org wrote: X-extent is used in many things other than self alignment positioning, so u don't want to change extents. Every positioning in LilyPond has some notion of padding save this interface. It would be a good addition, but could easily be in a follow-up patch. Ok, i agree that some padding would be desirable. What worries me is the multitude of paddings we have - they give me a headache; i quite frankly am lost in their different meanings. As of now i'm unsure how to implement such padding without making things more complicated, so i suggest to wait until other design questions are answered. As for chain_offset_callback, i've tried it (see attached patch), but i get a strange error: Processing `input/regression/add-stem-support.ly' Parsing... Interpreting music... Preprocessing graphical objects...ERROR: In procedure ly:self-alignment-interface::x-align-grob: ERROR: Wrong number of arguments to #primitive-procedure ly:self-alignment-interface::x-align-grob quite frankly, i don't know what's wrong. I've looked at other uses of chain_offset_callback and it seems that i've written my code correctly. I'll look into it when I get home. did you have any sucess with this stuff? thanks, janek https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
On 2 avr. 2013, at 00:51, janek.lilyp...@gmail.com wrote: On Mon, Apr 1, 2013 at 1:20 PM, m...@mikesolomon.org m...@mikesolomon.org wrote: X-extent is used in many things other than self alignment positioning, so u don't want to change extents. Every positioning in LilyPond has some notion of padding save this interface. It would be a good addition, but could easily be in a follow-up patch. Ok, i agree that some padding would be desirable. What worries me is the multitude of paddings we have - they give me a headache; i quite frankly am lost in their different meanings. As of now i'm unsure how to implement such padding without making things more complicated, so i suggest to wait until other design questions are answered. As for chain_offset_callback, i've tried it (see attached patch), but i get a strange error: Processing `input/regression/add-stem-support.ly' Parsing... Interpreting music... Preprocessing graphical objects...ERROR: In procedure ly:self-alignment-interface::x-align-grob: ERROR: Wrong number of arguments to #primitive-procedure ly:self-alignment-interface::x-align-grob quite frankly, i don't know what's wrong. I've looked at other uses of chain_offset_callback and it seems that i've written my code correctly. I'll look into it when I get home. did you have any sucess with this stuff? Try making the function accept a second optional argument with a previous offset (check out the offset functions in side position interface) Cheers, MS thanks, janek https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
I'd recommend adding a sort of padding property to the self-alignment-interface to get it completely there. That is, imagine that we right align to a grob and we want to be padded by 0.1 We should be able to do that. That'd allow self-alignment-interface to be used for grobs like InstrumentName. https://codereview.appspot.com/7768043/diff/46001/lily/new-fingering-engraver.cc File lily/new-fingering-engraver.cc (right): https://codereview.appspot.com/7768043/diff/46001/lily/new-fingering-engraver.cc#newcode291 lily/new-fingering-engraver.cc:291: // don't overwrite offset property if it was overridden by the user Consider chaining an offset callback here. See chain_callback and chain_offset_callback. https://codereview.appspot.com/7768043/diff/46001/lily/self-alignment-interface.cc File lily/self-alignment-interface.cc (right): https://codereview.appspot.com/7768043/diff/46001/lily/self-alignment-interface.cc#newcode152 lily/self-alignment-interface.cc:152: This would be the place to tack on padding. https://codereview.appspot.com/7768043/diff/46001/scm/define-grobs.scm File scm/define-grobs.scm (right): https://codereview.appspot.com/7768043/diff/46001/scm/define-grobs.scm#newcode143 scm/define-grobs.scm:143: (X-extent . (-0.1 . 0.1)) ;UGH! how to get ambitusline extent from its stencil? Why can't you use the standard X extent function given in grob.cc? https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel
Re: rewrite Self_alignment_interface (issue 7768043)
On 2013/03/30 18:15:11, MikeSol wrote: In general, I see a lot of reassigning of parents. What is the goal with this (sorry if you've explained this already)? What do you mean by reassigning of parents? I fetch grobs' parents often, but i don't give grobs new parents. https://codereview.appspot.com/7768043/diff/38001/lily/fingering-engraver.cc#newcode142 lily/fingering-engraver.cc:142: Self_alignment_interface::aligned_on_x_parent (fingerings_[i]-self_scm ())); This needs to be a chained offset procedure. See chain_offset_callback elsewhere in the code. ok, will investigate. https://codereview.appspot.com/7768043/diff/38001/lily/paper-column.cc#newcode222 lily/paper-column.cc:222: /* Good work! Thanks :) Janek https://codereview.appspot.com/7768043/ ___ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel