Re: \repeat unfold in parallel precludes correct working of \compressMMRests

2016-02-09 Thread David Kastrup
Simon Albrecht  writes:

> Hello,
>
> the following minimal example shows that \compressMMRests doesn’t work
> if there’s a \repeat unfold expression in parallel, regardless what
> its contents are:
>
> %%%
> \version "2.19.36"
>
> global = {
>   \repeat unfold 2 \skip 1
> }
>
> <<
>   \global
>   \compressMMRests \relative {
> R1*2
>   }
>>>

\compressMMRests does not work in parallel with anything having a
subdivision.  "Compressible" for LilyPond requires _nothing_ happening
musically during the compressed range.

Not a bug.  That's by design.

-- 
David Kastrup

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


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Urs,


Urs Liska wrote
> Are you completely sure that the issue is in LilyPond's output and not in
> the displaying program?

Well, I don't know how can I be *completely* sure about it, but I see this
issue on Evince and Okular pdf readers, as well as in Frescobaldi. If you
have some suggestion on how to test this further, please let me know.

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187039.html
Sent from the Bugs mailing list archive at Nabble.com.

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


Re: Noteheads slightly too large

2016-02-09 Thread tisimst
Gilberto, et al,

On Tue, Feb 9, 2016 at 7:14 AM, Gilberto Agostinho [via Lilypond] <
ml-node+s1069038n187039...@n5.nabble.com> wrote:

> Hi Urs,
>
> Urs Liska wrote
> Are you completely sure that the issue is in LilyPond's output and not in
> the displaying program?
>
> Well, I don't know how can I be *completely* sure about it, but I see this
> issue on Evince and Okular pdf readers, as well as in Frescobaldi. If you
> have some suggestion on how to test this further, please let me know.


WARNING!! TECHNICAL ANALYSIS AHEAD!! ;-)

Although microscopic, I can confirm this is true at the font level (at
least at the default printed 20pt size, I didn't check the other optical
variants). Relative to a 1000-em unit staff height (which is what the fonts
are designed to, center of bottom staff line to center of top staff line),
here are the dimensions causing the problem you are seeing:

staff-space = 250-em
staff line thickness = 25-em (i.e., 0.1 staff-space)
solid notehead height = 276-em

Now, here's the discrepancy. The distance between the bottom of a staff
line to the top of the next staff line up, is 250+25 = 275-em. That means
that there is an overall difference in size of 1-em unit (at the 20pt
printed size, this equates to 1/50pt = 0.00028in = 0.0071mm difference). In
other words, we are technically splitting hairs with this, but nonetheless,
it is a difference. The solid notehead is "too large" by 1/100pt on either
side.

I'm not sure if this warrants a design change or not, but there, at least,
is the evidence. It's not just the PDF reader. I've looked it over with
many different readers in both PDF and SVG backends and it always shows up.
Well, there's why.

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187044.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Simon Albrecht

On 09.02.2016 15:14, Gilberto Agostinho wrote:

I see this
issue on Evince and Okular pdf readers, as well as in Frescobaldi. If you
have some suggestion on how to test this further, please let me know.


Well, it’s known that on-screen display is often inexact. You might try 
other backends (SVG, PNG), else the best way of testing is printing it 
on paper.


Yours, Simon

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


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Schneidy,


Schneidy wrote
> Here's a workaround

That doesn't seem to work for me, I still get the noteheads creeping out the
staff lines, and if I lower the magnification value more (like 0.98 or less)
the noteheads suddenly get *much* smaller, leaving a hole in between them
and the staff lines.

But this is all besides the point, I simply raised this issue because I
think this should be fixed directly in source code, particularly given that
we take big pride in these minute engraving details that LilyPond normally
takes care of while other software fail to do. But for my own work which I
print in A4 paper, I really can't see this as an issue at all, so I am not
"affected" by it in this sense.

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187037.html
Sent from the Bugs mailing list archive at Nabble.com.

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


Re: Noteheads slightly too large

2016-02-09 Thread Urs Liska


Am 9. Februar 2016 14:59:45 MEZ, schrieb Gilberto Agostinho 
:
>Hi Schneidy,
>
>
>Schneidy wrote
>> Here's a workaround
>
>That doesn't seem to work for me, I still get the noteheads creeping
>out the
>staff lines, and if I lower the magnification value more (like 0.98 or
>less)
>the noteheads suddenly get *much* smaller, leaving a hole in between
>them
>and the staff lines.
>
>But this is all besides the point, I simply raised this issue because I
>think this should be fixed directly in source code, particularly given
>that
>we take big pride in these minute engraving details that LilyPond
>normally
>takes care of while other software fail to do. But for my own work
>which I
>print in A4 paper, I really can't see this as an issue at all, so I am
>not
>"affected" by it in this sense.

Are you completely sure that the issue is in LilyPond's output and not in the 
displaying program?

I agree that LilyPond should take this kind of issues seriously,  but there 
sometimes are more candidates fir causing them.

Urs

>
>Cheers,
>Gilberto
>
>
>
>--
>View this message in context:
>http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187037.html
>Sent from the Bugs mailing list archive at Nabble.com.
>
>___
>bug-lilypond mailing list
>bug-lilypond@gnu.org
>https://lists.gnu.org/mailman/listinfo/bug-lilypond

-- 
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

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


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Simon,


Simon Albrecht-2 wrote
> You might try 
> other backends (SVG, PNG), else the best way of testing is printing it 
> on paper.

So I tried this:

#(set-global-staff-size 90)
{
  c' d' e' f'
}

Then exported a png via Frescobaldi using resolution 1200 and in Publish
mode, and here is a crop of the result:

 

If you still judge that printing is necessary, I can try doing it next week
since I don't have a printer home.

Cheers,
Gilberto



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187042.html
Sent from the Bugs mailing list archive at Nabble.com.

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


Re: Noteheads slightly too large

2016-02-09 Thread Gilberto Agostinho
Hi Paul,


Paul Morris wrote
> Interesting...  Here’s some code for experimenting with this.  It scales
> notehead stencils. A scaling of 250/276 should make the solid notes equal
> to one staff-space.  (Or should it be 275/276 to make it the "distance
> between the bottom of a staff line to the top of the next staff line up”?)

The scaling of the notehead grob in your code indeed solves it, I used the
same resolution and zoom level as in the last png I posted and the notehead
is properly contained by the staves.

Cheers,
Gilberto




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187047.html
Sent from the Bugs mailing list archive at Nabble.com.

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


Re: Noteheads slightly too large

2016-02-09 Thread tisimst
On Tue, Feb 9, 2016 at 8:49 AM, Paul Morris [via Lilypond] <
ml-node+s1069038n187046...@n5.nabble.com> wrote:

> > On Feb 9, 2016, at 10:12 AM, tisimst <[hidden email]
> > wrote:
> >
> > Although microscopic, I can confirm this is true at the font level (at
> > least at the default printed 20pt size, I didn't check the other optical
> > variants). Relative to a 1000-em unit staff height (which is what the
> fonts
> > are designed to, center of bottom staff line to center of top staff
> line),
> > here are the dimensions causing the problem you are seeing:
> >
> > staff-space = 250-em
> > staff line thickness = 25-em (i.e., 0.1 staff-space)
> > solid notehead height = 276-em
> >
> > Now, here's the discrepancy. The distance between the bottom of a staff
> > line to the top of the next staff line up, is 250+25 = 275-em. That
> means
> > that there is an overall difference in size of 1-em unit (at the 20pt
> > printed size, this equates to 1/50pt = 0.00028in = 0.0071mm difference).
> In
> > other words, we are technically splitting hairs with this, but
> nonetheless,
> > it is a difference. The solid notehead is "too large" by 1/100pt on
> either
> > side.
>
> Interesting...  Here’s some code for experimenting with this.  It scales
> notehead stencils. A scaling of 250/276 should make the solid notes equal
> to one staff-space.  (Or should it be 275/276 to make it the "distance
> between the bottom of a staff line to the top of the next staff line up”?)
>
> -Paul
>
>
> \version "2.19.36"
>
> example = \relative {
>   c' d e f g a b c
> }
>
> {
>   \example
> }
>
> {
>   \override NoteHead.stencil =
>   #(lambda (grob)
>  (ly:stencil-scale
>   (ly:note-head::print grob)
>   250/276  250/276))
>
>   \example
> }
>

Well, that depends on where you want the top/bottom of the notehead to
touch the staff-lines:
- 275/276 - If you want it to have the same vertical extent as the two
touch staff lines.
- 250/276 - If you want it to touch the centers of the staff lines
- 225/276 - If you wanted them to fit perfectly withing the staff lines

HTH,
Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187048.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Paul Morris
> On Feb 9, 2016, at 10:12 AM, tisimst  wrote:
> 
> Although microscopic, I can confirm this is true at the font level (at
> least at the default printed 20pt size, I didn't check the other optical
> variants). Relative to a 1000-em unit staff height (which is what the fonts
> are designed to, center of bottom staff line to center of top staff line),
> here are the dimensions causing the problem you are seeing:
> 
> staff-space = 250-em
> staff line thickness = 25-em (i.e., 0.1 staff-space)
> solid notehead height = 276-em
> 
> Now, here's the discrepancy. The distance between the bottom of a staff
> line to the top of the next staff line up, is 250+25 = 275-em. That means
> that there is an overall difference in size of 1-em unit (at the 20pt
> printed size, this equates to 1/50pt = 0.00028in = 0.0071mm difference). In
> other words, we are technically splitting hairs with this, but nonetheless,
> it is a difference. The solid notehead is "too large" by 1/100pt on either
> side.

Interesting...  Here’s some code for experimenting with this.  It scales 
notehead stencils. A scaling of 250/276 should make the solid notes equal to 
one staff-space.  (Or should it be 275/276 to make it the "distance between the 
bottom of a staff line to the top of the next staff line up”?)

-Paul


\version "2.19.36"

example = \relative {
  c' d e f g a b c
}

{
  \example
}

{
  \override NoteHead.stencil =
  #(lambda (grob)
 (ly:stencil-scale
  (ly:note-head::print grob)
  250/276  250/276))

  \example
}




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


Re: Noteheads slightly too large

2016-02-09 Thread Pierre Perol-Schneider
Hi Paul,


2016-02-09 16:48 GMT+01:00 Paul Morris :


> \version "2.19.36"
>
> example = \relative {
>   c' d e f g a b c
> }
>
> {
>   \example
> }
>
> {
>   \override NoteHead.stencil =
>   #(lambda (grob)
>  (ly:stencil-scale
>   (ly:note-head::print grob)
>   250/276  250/276))
>
>   \example
> }
>

Some thoughts regarding the use of ly:stencil-scale:
1. the command seems to have a side effect on the stem attachment (or
probably no effect on the note head extents - tested on a W8 OS)
2. applying it on all note heads suppose that all glyphs have the same
scale defects (which is not the case, see my example with the harmonic
style).

So here's my attempt to get something liable to all note head styles.
Unfortunately I did note find any direct procedure to get the 'default
style ( '() do not work):

\version "2.19.36"
#(set-global-staff-size 180)
#(set-default-paper-size "a4" 'landscape)

#(define (my-note-heads grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
(case duration
   ((-1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  261/276)))
   ((0)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  262/276)))
   ((1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  263/276)))
   ((2)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  264/276)))
   (else (ly:note-head::print grob)

#(define (my-note-heads-new grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
;; "TODO: this means that 'my-note-heads-new
;; should apply only for the 'default style
;; does not work here though!
 ;(case style
   ;(('())
(case duration
   ((-1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.96)
  \musicglyph #"noteheads.sM1"
}
  #}))
   ((0)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.95)
  \musicglyph #"noteheads.s0"
}
  #}))
   ((1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.95)
  \musicglyph #"noteheads.s1"
}
  #}))
   ((2)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(0.98 . 0.95)
  \musicglyph #"noteheads.s2"
}
  #}))
  ;((harmonic)
   ;   (grob-interpret-markup grob
   ; #{
   ;  \markup {
   ; \scale #'(0.98 . 0.94)
;\musicglyph #"noteheads.s0harmonic"
   ;   }
;#}))
   (else (ly:note-head::print grob)

%% Test 1:
\relative {
  \override Staff.NoteHead.stencil = #my-note-heads
  %\override Staff.NoteHead.stencil = #my-note-heads-new
  d'4 f2*1/2 a1*1/4 c\breve*1/8
%% Test 2:
  %d'4 f2*1/2\harmonic a1*1/4 c\breve*1/8
}

Cheers,
Pierre
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Pierre Perol-Schneider
Send it again with something more homogeneous:

%%
\version "2.19.36"
#(set-global-staff-size 180)
#(set-default-paper-size "a4" 'landscape)

#(define (my-note-heads grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
(case duration
   ((-1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  261/276)))
   ((0)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  262/276)))
   ((1)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  263/276)))
   ((2)
(lambda (grob)
(ly:stencil-scale
  (ly:note-head::print grob)
  268/276  264/276)))
   (else (ly:note-head::print grob)

#(define (my-note-heads-new grob)
   (let* ((style (ly:grob-property grob 'style))
  (duration (ly:grob-property grob 'duration-log)))
;; "TODO: this means that 'my-note-heads-new
;; should apply only for the 'default style
;; does not work here though!
 ;(case style
   ;(('())
(case duration
   ((-1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 261/276)
  \musicglyph #"noteheads.sM1"
}
  #}))
   ((0)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 262/276)
  \musicglyph #"noteheads.s0"
}
  #}))
   ((1)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 263/276)
  \musicglyph #"noteheads.s1"
}
  #}))
   ((2)
(grob-interpret-markup grob
  #{
\markup {
  \scale #'(268/276 . 264/276)
  \musicglyph #"noteheads.s2"
}
  #}))
  ;((harmonic)
   ;   (grob-interpret-markup grob
   ; #{
   ;  \markup {
   ; \scale #'(0.98 . 0.94)
;\musicglyph #"noteheads.s0harmonic"
   ;   }
;#}))
   (else (ly:note-head::print grob)

%% Test 1:
\relative {
  %\override Staff.NoteHead.stencil = #my-note-heads
  \override Staff.NoteHead.stencil = #my-note-heads-new
  d'4 f2*1/2 a1*1/4 c\breve*1/8
%% Test 2:
  %d'4 f2*1/2\harmonic a1*1/4 c\breve*1/8
}
%

Cheers,
Pierre
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Andrew Bernard
Hi Abraham,

What unit is this particular em? In typography at least an em is a measurement 
equal to the currently specified point size for a font. That does not seem to 
fit your analysis here.

Andrew

On 10 February 2016 at 02:12:48, tisimst (tisimst.lilyp...@gmail.com) wrote:

Relative to a 1000-em unit staff height (which is what the fonts 
are designed to, center of bottom staff line to center of top staff line)
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread Paul Morris
Hi Pierre,

> On Feb 9, 2016, at 4:30 PM, Pierre Perol-Schneider 
>  wrote:
> 
> Some thoughts regarding the use of ly:stencil-scale:
> 1. the command seems to have a side effect on the stem attachment (or 
> probably no effect on the note head extents - tested on a W8 OS)
> 2. applying it on all note heads suppose that all glyphs have the same scale 
> defects (which is not the case, see my example with the harmonic style).
> 
> So here's my attempt to get something liable to all note head styles.
> Unfortunately I did note find any direct procedure to get the 'default style 
> ( '() do not work):

Well, I was only intending that code for testing purposes.  Looks like you’ve 
got a good start on something for actual use.

Cheers,
-Paul
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond


Re: Noteheads slightly too large

2016-02-09 Thread tisimst
Andrew,

On Tue, Feb 9, 2016 at 6:13 PM, Andrew Bernard [via Lilypond] <
ml-node+s1069038n187064...@n5.nabble.com> wrote:

> What unit is this particular em? In typography at least an em is a
> measurement equal to the currently specified point size for a font. That
> does not seem to fit your analysis here.


This is a good question, and my apologies for just throwing it out
there without defining it properly. I think what you are referring to is a
little different. An "em", like with an "em-dash" is defined as something
that has the same width as the capitol letter "M" in that typeface,
irrespective of pt size. The relative size is the same at 8pt as at 96pt.

What I'm referring to are the units that are used to define the shape of a
glyph, called em-units. These don't have anything to do with the displayed
size. Here's an example. It is fairly common in a text font to make the
capital letter "M" around 800-em units tall. "em-units" are just for
defining a relative scale. As the Wikipedia article[1] states it (under the
"History" section, 2nd paragraph):

"*In digital type, the em is a grid of arbitrary resolution that is used as
the design space of a digital font.*" That's all I mean.

Most fonts are usually defined relative to a resolution of a 1000em-unit
scale, a 1024em-unit scale or a 2048em-unit scale. In virtually all music
fonts, glyphs are defined relative to a 1000-em unit staff-size (center of
bottom line to center of top line), which makes a single staff-space equal
to 250-em units. It's just a convenience thing.

HTH,
Abraham

[1] https://en.wikipedia.org/wiki/Em_%28typography%29




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Noteheads-slightly-too-large-tp184659p187066.html
Sent from the Bugs mailing list archive at Nabble.com.
___
bug-lilypond mailing list
bug-lilypond@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-lilypond