Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-29 Thread Carl . D . Sorensen

On 2017/03/29 23:28:40, david.nalesnik wrote:


This is a simple bugfix of something that should have worked since the
MeasureCounter was introduced in 2.17.something.  As such, I don't

think a

Changes entry is warranted.



I would propose simply that I fix that bug only, nothing else -- no

extra

snippet, no changes to the existing snippets (which are already dense

enough

with information).  So I am inclined to upload a patch just with the
scm/define-grobs.scm alterations.


I don't think it needs a Changes entry.

But there should be a regression test that shows the proper function of
the 'staff-padding property on MeasureCounter.  That way, if it were to
break again in the future, we would know it.

We don't need a documentation snippet, but we do need a regtest.



https://codereview.appspot.com/312580043/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-29 Thread david . nalesnik

On 2017/03/29 22:00:12, pkx166h wrote:

>
> Sorry, I mean the *first* snippet.  (The count that begins with two

could be

> pushed further from the staff possibly.)



Yes that is probably a good idea (if you could add something that

would normally

collide - would a slur/tie *over* one of the group of notes work? - to

give such

an 'excuse' to use the padding?


There won't be any collisions -- the numbers will automatically avoid
them.

{
  \startMeasureCount
  c''4( c-\accent-\staccato-\marcato g'' d)
  \stopMeasureCount
}

The only good excuse to use staff-padding would be in an example such as
in the snippet I provided with the patch: getting all numbers at the
same level where different content in one measure would ordinarily push
the number higher than the number in another measure.  But as Simon
points out, the usage of staff-padding for this purpose is already well
documented.  There's no need for a new snippet, and I see no convenient
way to slip staff-padding into one of the existing snippets without it
being an "unjustified" change.



Also we should have a changes.tely entry as well - use your original

snippet as

the example there to use the work you have already done.



This is a simple bugfix of something that should have worked since the
MeasureCounter was introduced in 2.17.something.  As such, I don't think
a Changes entry is warranted.

I would propose simply that I fix that bug only, nothing else -- no
extra snippet, no changes to the existing snippets (which are already
dense enough with information).  So I am inclined to upload a patch just
with the scm/define-grobs.scm alterations.



https://codereview.appspot.com/312580043/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-29 Thread pkx166h




Sorry, I mean the *first* snippet.  (The count that begins with two

could be

pushed further from the staff possibly.)


Yes that is probably a good idea (if you could add something that would
normally collide - would a slur/tie *over* one of the group of notes
work? - to give such an 'excuse' to use the padding?

Also we should have a changes.tely entry as well - use your original
snippet as the example there to use the work you have already done.

James

https://codereview.appspot.com/312580043/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-29 Thread david . nalesnik

On 2017/03/29 12:40:32, david.nalesnik wrote:

On 2017/03/29 11:08:17, simon.albrecht wrote:
> I’m not sure if a doc snippet is really necessary.  Using

staff-padding is

> explained in
>


and

>


,


> IIRC we want to be careful about extending the NR, don’t we?



I have no particular attachment to the snippet, so if it's redundant

I'll remove

it.



> so maybe a verbal remark in the section on Measure counts with a

link there

> might suffice.



Besides its IR page, MeasureCounter is documented right now through

two

snippets:



http://lilypond.org/doc/v2.19/Documentation/snippets/repeats#repeats-numbering-groups-of-measures


http://lilypond.org/doc/v2.19/Documentation/snippets/repeats#repeats-centered-measure-numbers


I could amend the second snippet to use staff-padding?  Other than

that, I don't

see a convenient way to mention it.


Sorry, I mean the *first* snippet.  (The count that begins with two
could be pushed further from the staff possibly.)


https://codereview.appspot.com/312580043/
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-29 Thread david . nalesnik

On 2017/03/29 11:08:17, simon.albrecht wrote:

I’m not sure if a doc snippet is really necessary.  Using

staff-padding is

explained in


and

,


IIRC we want to be careful about extending the NR, don’t we?


I have no particular attachment to the snippet, so if it's redundant
I'll remove it.


so maybe a verbal remark in the section on Measure counts with a link

there

might suffice.


Besides its IR page, MeasureCounter is documented right now through two
snippets:

http://lilypond.org/doc/v2.19/Documentation/snippets/repeats#repeats-numbering-groups-of-measures

http://lilypond.org/doc/v2.19/Documentation/snippets/repeats#repeats-centered-measure-numbers

I could amend the second snippet to use staff-padding?  Other than that,
I don't see a convenient way to mention it.


https://codereview.appspot.com/312580043/
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-29 Thread simon . albrecht

I’m not sure if a doc snippet is really necessary.  Using staff-padding
is explained in

and
,
so maybe a verbal remark in the section on Measure counts with a link
there might suffice.  IIRC we want to be careful about extending the NR,
don’t we?

https://codereview.appspot.com/312580043/
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-28 Thread lemzwerg

LGTM

https://codereview.appspot.com/312580043/

___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel


Allow 'staff-padding to work with MeasureCounter (issue 312580043 by david.nales...@gmail.com)

2017-03-28 Thread david . nalesnik

Reviewers: ,

Message:
Please review.  Thanks!


Description:
Allow 'staff-padding to work with MeasureCounter

 -Set 'Y-offset in the grob description to the appropriate
callback.  (This is required for the default setting of
'staff-padding to have any effect.)

 -Provide a doc snippet to illustrate vertical alignment.

Please review this at https://codereview.appspot.com/312580043/

Affected files (+41, -0 lines):
  A Documentation/snippets/new/measure-counter-vertical-alignment.ly
  M scm/define-grobs.scm


Index: Documentation/snippets/new/measure-counter-vertical-alignment.ly
diff --git  
a/Documentation/snippets/new/measure-counter-vertical-alignment.ly  
b/Documentation/snippets/new/measure-counter-vertical-alignment.ly

new file mode 100644
index  
..6c20f509f394558fbc696e3c03eb206f32064e4f

--- /dev/null
+++ b/Documentation/snippets/new/measure-counter-vertical-alignment.ly
@@ -0,0 +1,40 @@
+\version "2.19.59"
+
+\header {
+  lsrtags = "repeats"
+
+  texidoc = "
+The @code{staff-padding} property may be used to align
+@code{MeasureCounter} objects vertically.  A group of such objects
+are aligned when @code{staff-padding} has a value greater or equal to
+the distance of the object furthest from the staff.  In the following
+example @code{staff-padding} is increased from the default (shown first)
+to align the first two numbers and finally all three.
+
+"
+  doctitle = "Measure counter vertical alignment"
+}
+
+music = {
+  \startMeasureCount
+  c''2 c''
+  c'''2 c'''
+  c2 c
+  \bar "||"
+  \stopMeasureCount
+}
+
+{
+  \music
+  \override Staff.MeasureCounter.staff-padding = 4
+  \music
+  \override Staff.MeasureCounter.staff-padding = 8
+  \music
+}
+
+\layout {
+  \context {
+\Staff
+\consists #Measure_counter_engraver
+  }
+}
Index: scm/define-grobs.scm
diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm
index  
45cac04bd3d65b1146beec8acdf89b42bcf8be7c..cdea705c4d6f186122ed164e84b72f0a7079359f  
100644

--- a/scm/define-grobs.scm
+++ b/scm/define-grobs.scm
@@ -1455,6 +1455,7 @@
 (side-axis . ,Y)
 (staff-padding . 0.5)
 (stencil . ,measure-counter-stencil)
+(Y-offset . ,side-position-interface::y-aligned-side)
 (meta . ((class . Spanner)
  (interfaces . (font-interface
 measure-counter-interface



___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel