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

Issue 8647044: Add the command \offset to LilyPond

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by david.nalesnik
Modified:
10 years, 6 months ago
Reviewers:
janek, dak, lemzwerg
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

Add the command \offset to LilyPond The commands \override and \tweak set grob properties to absolute values. The ability to specify relative values--to displace values of various properties from current settings--would be a useful enhancement of LilyPond. Currently, this is possible for default values of the property 'control-points using the \shape command. The following patch seeks to generalize the application of offsets to grob properties. Both overrides and tweaks are supported, on the model of the commands \shape and \alterBroken. Offsets are currently limited to three data types: number, number-pair, and number-pair-list (this last is defined by this patch and represents the type used by 'control-points, for example). Offsets are limited to grob properties listed in the default descriptions found in `scm/define-grobs.scm'.) Displacements will be reckoned against an override in effect; otherwise, the default setting will be used. There is some ability for accumulation of offsets.

Patch Set 1 #

Total comments: 10

Patch Set 2 : Shorten regtest and other changes #

Total comments: 12

Patch Set 3 : changes based on David's review #

Total comments: 4

Patch Set 4 : changes in response to David's review #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -0 lines) Patch
A input/regression/offsets.ly View 1 2 3 1 chunk +73 lines, -0 lines 0 comments Download
M ly/music-functions-init.ly View 1 2 1 chunk +20 lines, -0 lines 1 comment Download
M scm/c++.scm View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M scm/lily.scm View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M scm/music-functions.scm View 1 2 3 1 chunk +92 lines, -0 lines 1 comment Download

Messages

Total messages: 39
david.nalesnik
Please review. Thanks, David
11 years ago (2013-04-13 16:46:20 UTC) #1
janek
There's one thing that puzzles me. Current syntax is \offset property offset-value grob-name I understand ...
11 years ago (2013-04-13 21:39:40 UTC) #2
david.nalesnik
I've considerably shortened the regtests, removing redundancies and unnecessary line breaks. Thanks for the comments! ...
11 years ago (2013-04-16 12:41:35 UTC) #3
david.nalesnik
On 2013/04/13 21:39:40, janek wrote: > There's one thing that puzzles me. Current syntax is ...
11 years ago (2013-04-16 12:50:47 UTC) #4
dak
On 2013/04/16 12:50:47, david.nalesnik wrote: > On 2013/04/13 21:39:40, janek wrote: > > There's one ...
11 years ago (2013-04-16 13:03:25 UTC) #5
janek
On 2013/04/16 13:03:25, dak wrote: > On 2013/04/16 12:50:47, david.nalesnik wrote: > > Here I ...
11 years ago (2013-04-16 13:59:17 UTC) #6
dak
> and there's too many "or-nothing"s there (i suppose > that the biggest problem is ...
11 years ago (2013-04-16 14:29:54 UTC) #7
janek
2013/4/16 <dak@gnu.org>: >> and there's too many "or-nothing"s there (i suppose >> that the biggest ...
11 years ago (2013-04-16 14:33:50 UTC) #8
dak
On 2013/04/16 14:33:50, janek wrote: > 2013/4/16 <dak@gnu.org>: > > nothing-or-music in the last position ...
11 years ago (2013-04-16 15:09:02 UTC) #9
janek
Sorry for the delay, got little lilypond-time recently... 2013/4/16 <dak@gnu.org>: > On 2013/04/16 14:33:50, janek ...
11 years ago (2013-04-21 07:59:11 UTC) #10
dak
Janek Warchoł <janek.lilypond@gmail.com> writes: > Sorry for the delay, got little lilypond-time recently... > > ...
11 years ago (2013-04-21 08:23:34 UTC) #11
janek
anyway, this patch LTGM.
11 years ago (2013-04-23 13:14:23 UTC) #12
david.nalesnik
On 2013/04/23 13:14:23, janek wrote: > anyway, this patch LTGM. Thanks, Janek! The patch has ...
11 years ago (2013-04-23 19:03:18 UTC) #13
dak
On 2013/04/23 19:03:18, david.nalesnik wrote: > On 2013/04/23 13:14:23, janek wrote: > > anyway, this ...
11 years ago (2013-04-23 19:38:09 UTC) #14
david.nalesnik
On 2013/04/23 19:38:09, dak wrote: > On 2013/04/23 19:03:18, david.nalesnik wrote: > > On 2013/04/23 ...
11 years ago (2013-04-23 20:05:46 UTC) #15
dak
Sorry for the late review. https://codereview.appspot.com/8647044/diff/5001/input/regression/offsets.ly File input/regression/offsets.ly (right): https://codereview.appspot.com/8647044/diff/5001/input/regression/offsets.ly#newcode5 input/regression/offsets.ly:5: the @code{\\offset} command. These ...
11 years ago (2013-04-23 20:24:57 UTC) #16
dak
https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm File scm/music-functions.scm (right): https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm#newcode2103 scm/music-functions.scm:2103: ; head of the alist. We reverse the alist ...
11 years ago (2013-04-23 22:09:04 UTC) #17
david.nalesnik
David, Thank you for your reviews. It will take me some time to make the ...
11 years ago (2013-04-24 11:21:37 UTC) #18
david.nalesnik
https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm File scm/music-functions.scm (right): https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm#newcode2103 scm/music-functions.scm:2103: ; head of the alist. We reverse the alist ...
11 years ago (2013-04-25 13:48:55 UTC) #19
david.nalesnik
https://codereview.appspot.com/8647044/diff/5001/scm/c++.scm File scm/c++.scm (right): https://codereview.appspot.com/8647044/diff/5001/scm/c++.scm#newcode30 scm/c++.scm:30: (every number-pair? x))) On 2013/04/23 20:24:57, dak wrote: > ...
10 years, 6 months ago (2013-10-04 01:17:08 UTC) #20
dak
On 2013/10/04 01:17:08, david.nalesnik wrote: > https://codereview.appspot.com/8647044/diff/5001/scm/c++.scm > File scm/c++.scm (right): > > https://codereview.appspot.com/8647044/diff/5001/scm/c++.scm#newcode30 > ...
10 years, 6 months ago (2013-10-04 05:59:00 UTC) #21
dak
https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm File scm/music-functions.scm (right): https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm#newcode2103 scm/music-functions.scm:2103: ; head of the alist. We reverse the alist ...
10 years, 6 months ago (2013-10-04 05:59:15 UTC) #22
david.nalesnik
https://codereview.appspot.com/8647044/diff/5001/input/regression/offsets.ly File input/regression/offsets.ly (right): https://codereview.appspot.com/8647044/diff/5001/input/regression/offsets.ly#newcode5 input/regression/offsets.ly:5: the @code{\\offset} command. These properties are limited to immutable ...
10 years, 6 months ago (2013-10-06 01:15:12 UTC) #23
lemzwerg
LGTM. Maybe you can somewhere add a sentence like Note that \tweak and friends provide ...
10 years, 6 months ago (2013-10-06 06:06:40 UTC) #24
dak
Just before I forget: this is not a real comment on this issue. David N ...
10 years, 6 months ago (2013-10-06 09:35:56 UTC) #25
david.nalesnik
On 2013/10/06 06:06:40, lemzwerg wrote: > LGTM. > > Maybe you can somewhere add a ...
10 years, 6 months ago (2013-10-07 13:31:48 UTC) #26
dak
On 2013/10/06 01:15:12, david.nalesnik wrote: > https://codereview.appspot.com/8647044/diff/5001/input/regression/offsets.ly > File input/regression/offsets.ly (right): > > https://codereview.appspot.com/8647044/diff/5001/input/regression/offsets.ly#newcode5 > ...
10 years, 6 months ago (2013-10-07 14:10:09 UTC) #27
dak
https://codereview.appspot.com/8647044/diff/35001/input/regression/offsets.ly File input/regression/offsets.ly (right): https://codereview.appspot.com/8647044/diff/35001/input/regression/offsets.ly#newcode31 input/regression/offsets.ly:31: Spurious space in otherwise empty line.
10 years, 6 months ago (2013-10-07 14:10:31 UTC) #28
dak
https://codereview.appspot.com/8647044/diff/35001/scm/c++.scm File scm/c++.scm (right): https://codereview.appspot.com/8647044/diff/35001/scm/c++.scm#newcode30 scm/c++.scm:30: (not (null? x)) Why not null? An empty list ...
10 years, 6 months ago (2013-10-07 14:13:31 UTC) #29
david.nalesnik
https://codereview.appspot.com/8647044/diff/35001/input/regression/offsets.ly File input/regression/offsets.ly (right): https://codereview.appspot.com/8647044/diff/35001/input/regression/offsets.ly#newcode31 input/regression/offsets.ly:31: On 2013/10/07 14:10:32, dak wrote: > Spurious space in ...
10 years, 6 months ago (2013-10-07 17:01:00 UTC) #30
david.nalesnik
On 2013/10/07 14:10:09, dak wrote: > On 2013/10/06 01:15:12, david.nalesnik wrote: > > There is ...
10 years, 6 months ago (2013-10-07 17:13:23 UTC) #31
dak
https://codereview.appspot.com/8647044/diff/48001/ly/music-functions-init.ly File ly/music-functions-init.ly (right): https://codereview.appspot.com/8647044/diff/48001/ly/music-functions-init.ly#newcode705 ly/music-functions-init.ly:705: (if (ly:music? item) Ok, I am annoyed at the ...
10 years, 6 months ago (2013-10-07 19:02:47 UTC) #32
janek
Hi, an afterthought. On 2013/10/06 01:15:12, david.nalesnik wrote: > The examples below represent my efforts ...
10 years, 6 months ago (2013-10-15 18:04:43 UTC) #33
dak
On 2013/10/15 18:04:43, janek wrote: > Hi, > > an afterthought. > > On 2013/10/06 ...
10 years, 6 months ago (2013-10-15 18:19:58 UTC) #34
janek
2013/10/15 <dak@gnu.org>: > On 2013/10/15 18:04:43, janek wrote: > Well, that's the slightly icky thing. ...
10 years, 6 months ago (2013-10-15 18:42:52 UTC) #35
david.nalesnik
https://codereview.appspot.com/8647044/diff/48001/scm/music-functions.scm File scm/music-functions.scm (right): https://codereview.appspot.com/8647044/diff/48001/scm/music-functions.scm#newcode2118 scm/music-functions.scm:2118: (let* ((immutable (ly:grob-basic-properties grob)) I just noticed something unfortunate ...
10 years, 6 months ago (2013-10-20 15:51:57 UTC) #36
dak
On 2013/10/20 15:51:57, david.nalesnik wrote: > https://codereview.appspot.com/8647044/diff/48001/scm/music-functions.scm > File scm/music-functions.scm (right): > > https://codereview.appspot.com/8647044/diff/48001/scm/music-functions.scm#newcode2118 > ...
10 years, 6 months ago (2013-10-20 16:15:56 UTC) #37
david.nalesnik
On 2013/10/20 16:15:56, dak wrote: > On 2013/10/20 15:51:57, david.nalesnik wrote: > > https://codereview.appspot.com/8647044/diff/48001/scm/music-functions.scm > ...
10 years, 6 months ago (2013-10-20 20:35:20 UTC) #38
dak
10 years, 6 months ago (2013-10-20 21:08:00 UTC) #39
On 2013/10/20 20:35:20, david.nalesnik wrote:
> 
> OK, that makes sense.  I've rewritten offset according to these guidelines.  A
> side benefit
> is that it was no trouble to allow directed tweaks, so the following is
> possible:
> 
> {
>   <c'' e'' \offset AccidentalPlacement.right-padding #2 ges''!>4
>   <c'' e'' \offset X-offset #-2 ges''!>4
> }

Oh.  Indeed.
Sign in to reply to this message.

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