|
|
Created:
13 years, 9 months ago by Janek Warchol Modified:
10 years ago Reviewers:
mike, janek, carl.d.sorensen, Neil Puttock, reinhold, MikeSol, xratamacue, joeneeman, Valentin Villenave, pkx166h, Graham Percival (old account) CC:
lilypond-devel_gnu.org Visibility:
Public. |
Descriptionmodifying 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.
Patch Set 1 #
Total comments: 1
Patch Set 2 : introduce shape property and use style to choose between behaviours #Patch Set 3 : document properties #
Total comments: 6
Patch Set 4 : current Lily behavoiur is default again #Patch Set 5 : removing redundant lines #Patch Set 6 : renaming default to parallelogram #Patch Set 7 : replacing parallelogram with beam-like #Patch Set 8 : adjusting to fixcc #Patch Set 9 : small fix #
Total comments: 2
Patch Set 10 : add regtest #
Total comments: 6
Patch Set 11 : style fix #
MessagesTotal messages: 32
Passes regtests.
Sign in to reply to this message.
Looks mostly good to me. Thanks, Carl http://codereview.appspot.com/4636081/diff/1/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/1/lily/stem-tremolo.cc#newcode42 lily/stem-tremolo.cc:42: that it's not proper notation. We shouldn't keep the code in and commented out; let's just get rid of it. No old cruft kept around.
Sign in to reply to this message.
Hi Janek, I'm afraid I don't like this at all. While the authorities may be in agreement that the slashes should be sloped, all the scores I've looked at follow the same style as LilyPond (which I think reflects a more traditional hand-engraved style). It would be preferable to allow users to choose whether to keep the current default or switch to the more modern behaviour. This could be as simple as adding a calc-slope callback which ignores beams and setting style to 'default. Cheers, Neil
Sign in to reply to this message.
Actually, non-rectangular, constant-sloped beams used to be the default, but I changed them (some years ago now) to be rectangular and parallel to the beam, since that's what most of my scores have. My music collection isn't with me right now, but I can confirm at least that B&H's urtext edition of Bartok's solo violin sonata uses rectangular, parallel-to-the-beam tremolos. Cheers, Joe
Sign in to reply to this message.
Finally - new patch set uploaded. Now it's possible to easily switch between different tremolo behaviours. 'Style' property is no longer used to choose between rectangular and beam-like slashes - this is now done using 'shape' property. 'Style' property now influences both 'shape' and 'slope' of the slashes: - style=constant produces beam-like slashes with slope .4 in case of downstem flagged notes and slope .25 in all other cases, - style=varying is equal to current default behaviour. It's possible to choose a combination of those by setting both 'style' and 'shape' properties. Pdf demonstrating new behaviour: http://lilypond.googlecode.com/issues/attachment?aid=17350003001&name=tremolo... Please review. Suggestions on value names are most welcome!
Sign in to reply to this message.
Hello, can someone else verify? I get a make fail: --snip-- [/home/jlowe/lilypond-git/build/out/share/lilypond/current/scm/document-markup.scm] Writing "internals.texi"...ERROR: In procedure procedure-name: ERROR: Wrong type argument in position 1: #f make[1]: *** [out/internals.texi] Error 1 rm out/weblinks.itexi make[1]: Leaving directory `/home/jlowe/lilypond-git/build/Documentation' make: *** [all] Error 2
Sign in to reply to this message.
2011/7/18 <pkx166h@gmail.com>: > Hello, can someone else verify? > > I get a make fail: I get it too... Strange, it compiled some time ago. Btw, > [/home/jlowe/lilypond-git/build/out/share/lilypond/current/scm/document-markup.scm] > Writing "internals.texi"...ERROR: In procedure procedure-name: > ERROR: Wrong type argument in position 1: #f > make[1]: *** [out/internals.texi] Error 1 > rm out/weblinks.itexi > make[1]: Leaving directory > `/home/jlowe/lilypond-git/build/Documentation' > make: *** [all] Error 2 what does this mean? I het similar errors from time to time and i never know what to do with them. cheers, Janek
Sign in to reply to this message.
2011/7/18 Janek Warchoł <lemniskata.bernoullego@gmail.com>: > Btw, > >> [/home/jlowe/lilypond-git/build/out/share/lilypond/current/scm/document-markup.scm] >> Writing "internals.texi"...ERROR: In procedure procedure-name: >> ERROR: Wrong type argument in position 1: #f >> make[1]: *** [out/internals.texi] Error 1 >> rm out/weblinks.itexi >> make[1]: Leaving directory >> `/home/jlowe/lilypond-git/build/Documentation' >> make: *** [all] Error 2 > > what does this mean? I het similar errors from time to time and i > never know what to do with them. It usually means you've added a property but neglected to document it: +++ b/scm/define-grobs.scm @@ -1934,7 +1934,7 @@ (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space (slope . ,ly:stem-tremolo::calc-slope) (stencil . ,ly:stem-tremolo::print) - (style . ,ly:stem-tremolo::calc-style) + (shape . ,ly:stem-tremolo::calc-shape) 'shape needs documentation in scm/define-grob-properties.scm. BTW, you're still reading 'style in stem-tremolo.cc, so it shouldn't be removed from the interface macro. Cheers, Neil
Sign in to reply to this message.
2011/7/18 Neil Puttock <n.puttock@gmail.com>: > 2011/7/18 Janek Warchoł <lemniskata.bernoullego@gmail.com>: > >> Btw, >> >>> [/home/jlowe/lilypond-git/build/out/share/lilypond/current/scm/document-markup.scm] >>> Writing "internals.texi"...ERROR: In procedure procedure-name: >>> ERROR: Wrong type argument in position 1: #f >>> make[1]: *** [out/internals.texi] Error 1 >>> rm out/weblinks.itexi >>> make[1]: Leaving directory >>> `/home/jlowe/lilypond-git/build/Documentation' >>> make: *** [all] Error 2 >> >> what does this mean? I het similar errors from time to time and i >> never know what to do with them. > > It usually means you've added a property but neglected to document it: > > +++ b/scm/define-grobs.scm > @@ -1934,7 +1934,7 @@ > (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space > (slope . ,ly:stem-tremolo::calc-slope) > (stencil . ,ly:stem-tremolo::print) > - (style . ,ly:stem-tremolo::calc-style) > + (shape . ,ly:stem-tremolo::calc-shape) > > 'shape needs documentation in scm/define-grob-properties.scm. > > BTW, you're still reading 'style in stem-tremolo.cc, so it shouldn't > be removed from the interface macro. Thanks! New patch set uploaded to deal with this. (btw I hope that i didn't write anything untrue there..,) Makes from scratch. cheers, Janek http://codereview.appspot.com/4636081/
Sign in to reply to this message.
Make works now and I get some reg test output differences See http://code.google.com/p/lilypond/issues/detail?id=1735#c4 James
Sign in to reply to this message.
2011/7/19 <pkx166h@gmail.com>: > Make works now and I get some reg test output differences > http://code.google.com/p/lilypond/issues/detail?id=1735#c4 They look exacly like they are expected to look. thanks, Janek
Sign in to reply to this message.
http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc#newcode42 lily/stem-tremolo.cc:42: style = ly_symbol2scm ("constant"); You can remove these two lines and use style == ly_symbol2scm ("varying") below http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc#newcode93 lily/stem-tremolo.cc:93: style = ly_symbol2scm ("constant"); These two lines are redundant.
Sign in to reply to this message.
New patch set uploaded. Current Lily default behaviour is kept as default now. http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc#newcode42 lily/stem-tremolo.cc:42: style = ly_symbol2scm ("constant"); On 2011/07/21 08:39:53, joeneeman wrote: > You can remove these two lines and use > style == ly_symbol2scm ("varying") > below Done. http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc#newcode93 lily/stem-tremolo.cc:93: style = ly_symbol2scm ("constant"); On 2011/07/21 08:39:53, joeneeman wrote: > These two lines are redundant. Isn't their purpose to guard against undefined (empty) style property?
Sign in to reply to this message.
http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc#newcode93 lily/stem-tremolo.cc:93: style = ly_symbol2scm ("constant"); On 2011/07/23 19:58:19, Janek Warchol wrote: > On 2011/07/21 08:39:53, joeneeman wrote: > > These two lines are redundant. > > Isn't their purpose to guard against undefined (empty) style property? (i've seen similar constructs in other places, that's why i used it)
Sign in to reply to this message.
http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/10001/lily/stem-tremolo.cc#newcode93 lily/stem-tremolo.cc:93: style = ly_symbol2scm ("constant"); On 2011/07/23 19:58:19, Janek Warchol wrote: > On 2011/07/21 08:39:53, joeneeman wrote: > > These two lines are redundant. > > Isn't their purpose to guard against undefined (empty) style property? If style is empty (or not a symbol) then (style == ly_symbol2scm ("varying")) will be false and you'll just return 'default.
Sign in to reply to this message.
makes fine. No reg test differences now.
Sign in to reply to this message.
Joe: redundant lines removed. Interesting thing happens when i compare regtests: i see a difference in part-combine-tuplet-end.ly, which is completely unrelated to tremolos. Even funnier, my branch compiled this test better than master... Perhaps i should've built from scratch. BTW, should i add a regtest to this?
Sign in to reply to this message.
New patch set uploaded. Minor style change: slash shape that was named "default" (which was confusing) is now named "parallelogram" (because that's how it looks like). If you don't like parallelograms ;) we can name it beam-like or sth.
Sign in to reply to this message.
Am Freitag 29 Juli 2011, 07:38:26 schrieben Sie: > New patch set uploaded. Minor style change: slash shape that was named > "default" (which was confusing) is now named "parallelogram" (because > that's how it looks like). > If you don't like parallelograms ;) we can name it beam-like or sth. Yes, please don't use "parallelogram"! After all, the slashes are parallelograms, too, so the name does not really distinguish the two styles... Cheers, Reinhold -- ------------------------------------------------------------------ Reinhold Kainhofer, Vienna University of Technology, Austria email: reinhold@kainhofer.com, http://reinhold.kainhofer.com/ * Financial and Actuarial Mathematics, TU Wien, http://www.fam.tuwien.ac.at/ * Edition Kainhofer Music Publishing, http://www.edition-kainhofer.com/ * LilyPond music typesetting software, http://www.lilypond.org/
Sign in to reply to this message.
Reinhold: ok, replaced parallelogram with beam-like
Sign in to reply to this message.
make passes and no reg tests differences
Sign in to reply to this message.
cannot apply to master due to fixcc.
Sign in to reply to this message.
Oh no! I hoped to get it on this countdown. A version compatible with fixcc uploaded.
Sign in to reply to this message.
Needs a regression test exercising the different settings. http://codereview.appspot.com/4636081/diff/38001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/38001/lily/stem-tremolo.cc#newcode118 lily/stem-tremolo.cc:118: shape = ly_symbol2scm ("beam-like"); this is redundant unless you want to add a warning for invalid shape setting (you only check for rectangle below; anything else falls through to Lookup::beam ())
Sign in to reply to this message.
Regtest added. http://codereview.appspot.com/4636081/diff/38001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/38001/lily/stem-tremolo.cc#newcode118 lily/stem-tremolo.cc:118: shape = ly_symbol2scm ("beam-like"); On 2011/08/11 20:05:10, Neil Puttock wrote: > this is redundant unless you want to add a warning for invalid shape setting > (you only check for rectangle below; anything else falls through to Lookup::beam > ()) True, but shouldn't we leave it to make the code more logical and elegant (and in case we want to expand it in the future)?
Sign in to reply to this message.
LGTM Cheers, MS http://codereview.appspot.com/4636081/diff/42001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/42001/lily/stem-tremolo.cc#newcode61 lily/stem-tremolo.cc:61: return scm_from_double ((Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN && !(beam)) !beam http://codereview.appspot.com/4636081/diff/42001/lily/stem-tremolo.cc#newcode93 lily/stem-tremolo.cc:93: return ly_symbol2scm (((stemdir == UP && flag) || beam) ? "rectangle" : "beam-like"); return ly_symbol2scm (style != ly_symbol2scm ("constant") && ((stemdir == UP && flag) || beam) ? "rectangle" : "beam-like"); with proper indenting... http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm File scm/define-grobs.scm (right): http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm#newcode... scm/define-grobs.scm:1944: (X-extent . ,ly:stem-tremolo::width) For consistency's sake (I just went through this with flags), keep this as a style property and document the possible values in the Stem_tremolo docstring in stem-tremolo.cc (the part with ADD_INTERFACE).
Sign in to reply to this message.
New patch set uploaded. http://codereview.appspot.com/4636081/diff/42001/lily/stem-tremolo.cc File lily/stem-tremolo.cc (right): http://codereview.appspot.com/4636081/diff/42001/lily/stem-tremolo.cc#newcode61 lily/stem-tremolo.cc:61: return scm_from_double ((Stem::duration_log (stem) >= 3 && get_grob_direction (stem) == DOWN && !(beam)) On 2011/08/23 07:48:39, MikeSol wrote: > !beam Done. http://codereview.appspot.com/4636081/diff/42001/lily/stem-tremolo.cc#newcode93 lily/stem-tremolo.cc:93: return ly_symbol2scm (((stemdir == UP && flag) || beam) ? "rectangle" : "beam-like"); On 2011/08/23 07:48:39, MikeSol wrote: > return ly_symbol2scm (style != ly_symbol2scm ("constant") && ((stemdir == UP && > flag) || beam) ? "rectangle" : "beam-like"); > > with proper indenting... Done. http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm File scm/define-grobs.scm (right): http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm#newcode... scm/define-grobs.scm:1944: (X-extent . ,ly:stem-tremolo::width) On 2011/08/23 07:48:39, MikeSol wrote: > For consistency's sake (I just went through this with flags), keep this as a > style property and document the possible values in the Stem_tremolo docstring in > stem-tremolo.cc (the part with ADD_INTERFACE). I'm not sure if i understand. Do you say that i should rename shape to style?
Sign in to reply to this message.
Still passes make and reg tests
Sign in to reply to this message.
Hey Mike, 2011/8/27 <janek.lilypond@gmail.com>: > http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm#newcode... > scm/define-grobs.scm:1944: (X-extent . ,ly:stem-tremolo::width) > On 2011/08/23 07:48:39, MikeSol wrote: >> >> For consistency's sake (I just went through this with flags), keep this >> as a style property and document the possible values in the Stem_tremolo >> docstring in stem-tremolo.cc (the part with ADD_INTERFACE). > > I'm not sure if i understand. Do you say that i should rename shape to > style? I'm not sure whether i should push this patch or not. Can you explain what is your concern? cheers, Janek http://codereview.appspot.com/4636081/
Sign in to reply to this message.
On Sep 5, 2011, at 10:31 PM, Janek Warchoł wrote: > Hey Mike, > > 2011/8/27 <janek.lilypond@gmail.com>: >> http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm#newcode... >> scm/define-grobs.scm:1944: (X-extent . ,ly:stem-tremolo::width) >> On 2011/08/23 07:48:39, MikeSol wrote: >>> >>> For consistency's sake (I just went through this with flags), keep this >>> as a style property and document the possible values in the Stem_tremolo >>> docstring in stem-tremolo.cc (the part with ADD_INTERFACE). >> >> I'm not sure if i understand. Do you say that i should rename shape to >> style? > > I'm not sure whether i should push this patch or not. Can you explain > what is your concern? > > cheers, > Janek > Sorry - I meant that the property name should be `style.' Could you send me a quick update stating where you're at w/ this patch? Cheers, MS
Sign in to reply to this message.
2011/9/16 mike@apollinemike.com <mike@apollinemike.com>: > On Sep 5, 2011, at 10:31 PM, Janek Warchoł wrote: > >> Hey Mike, >> >> 2011/8/27 <janek.lilypond@gmail.com>: >>> http://codereview.appspot.com/4636081/diff/42001/scm/define-grobs.scm#newcode... >>> scm/define-grobs.scm:1944: (X-extent . ,ly:stem-tremolo::width) >>> On 2011/08/23 07:48:39, MikeSol wrote: >>>> >>>> For consistency's sake (I just went through this with flags), keep this >>>> as a style property and document the possible values in the Stem_tremolo >>>> docstring in stem-tremolo.cc (the part with ADD_INTERFACE). >>> >>> I'm not sure if i understand. Do you say that i should rename shape to >>> style? >> >> I'm not sure whether i should push this patch or not. Can you explain >> what is your concern? > > Sorry - I meant that the property name should be `style.' But there is 'style' property, only it's used for something else. Before my patch, there was 'style' property which was about the slashes being rectangular or not. My patch renames this to 'shape' property and intoduces 'style' property that does something else. So, if we keep 'style' property doing what it was doing already, how should we name the new property? And BTW, maybe i forgot to add something somewhere? Maybe it should be listed in define-grobs.scm? > Could you send me a quick update stating where you're at w/ this patch? It is ready to go except for the above. I hope this is clear now. cheers, Janek
Sign in to reply to this message.
On 2011/09/17 19:29:40, janek wrote: > It is ready to go except for the above. Greetings, I realize that this patch has been sort of forgotten, so I thought I’d update it and re-upload it: https://codereview.appspot.com/227070043/
Sign in to reply to this message.
|