Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-02-08 Thread Paul Morris
> On Jan 31, 2016, at 5:15 PM, Simon Albrecht  wrote:
> 
> I do think that it should be easier to override staff line thickness in a 
> style sheet without changing other line thicknesses.

This would indeed be a good thing.  In the meantime, this snippet shows a 
possible workaround/hack:

http://lsr.di.unimi.it/LSR/Item?id=277

You may have to hold your nose, although it’s probably more foolproof than 
trying to do an inverse setting for everything affected by line-thickness.

To make things easier, I can imagine a user function that returns a list of 
line positions based on a thickness argument (and maybe optionally a line 
pattern list).  So for a staff with a single line at position '(2) it would 
return '(1.9  2  2.1) or maybe just '(1.9  2.1) when given a thickness argument 
of 0.2

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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-02-08 Thread Paul Morris
> On Feb 8, 2016, at 11:33 AM, Paul Morris  wrote:
> 
> To make things easier, I can imagine a user function that returns a list of 
> line positions based on a thickness argument (and maybe optionally a line 
> pattern list).  So for a staff with a single line at position '(2) it would 
> return '(1.9  2  2.1) or maybe just '(1.9  2.1) when given a thickness 
> argument of 0.2

\version "2.18.2"

#(define (thicker-line-positions thick pattern)
   (let ((th (/ thick 2)))
   (append-map 
(lambda (ln) (list (- ln th) ln (+ ln th)))
pattern)))

% #(display (thicker-line-positions 0.1 '(-4 -2 0 2 4)))
% displays:  (-4.05 -4 -3.95 -2.05 -2 -1.95 -0.05 0 0.05 1.95 2 2.05 3.95 4 
4.05)

#(define (line-positions-callback thick pattern)
   (lambda (grob) 
 (thicker-line-positions thick pattern)))


\relative {
  c'1 c c c 
}

\relative {
  \override Staff.StaffSymbol.line-positions =
  #(lambda (grob) (thicker-line-positions 0.2 '(-4 -2 0 2 4)))
  c'1 c c c 
}

\relative {
  \override Staff.StaffSymbol.line-positions =
  #(line-positions-callback 0.2 '(-4 -2 0 2 4))
  c'1 c c c 
}

%%

If we wanted to get extra fancy, we might be able to get the line-thickness 
property from the grob, and then use that to calculate things... such that when 
you entered X as a thickness input it would result in the same line thickness 
as entering X directly as a line-thickness value.  

…or there’s visual eyeballing and trial and error with the above.

Cheers,
-Paul 






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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Simon Albrecht

On 31.01.2016 22:34, Kieren MacMillan wrote:

Ultimately, my goal is to be able to design stylesheets that match certain “house 
styles” (e.g., Hanle, Chappell & Co., Peters). I find that many plate-engraved 
scores appear to have a slightly heavier overall look to the staff lines, so I 
wanted to increase them without necessarily increasing the others proportionally.


I agree, by default the staff lines look rather light in LilyPond. 
Perhaps you can make a point if you statistically show that 
hand-engraved scores use to have thicker staff lines in relation to 
other line thicknesses, such as to convince ‘the developers’ that we 
should change the default.
In the meantime, I do think that it should be easier to override staff 
line thickness in a style sheet without changing other line thicknesses. 
And it really makes sense to have a context property ‘lineThickness’ as 
‘master’ line thickness, instead of a grob property 
StaffSymbol.thickness. I’ll submit that as an enhancement request.


Best, Simon

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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Noeck
Hi,

Am 31.01.2016 um 17:31 schrieb Pierre Perol-Schneider:
> Apparently, StaffSymbol.thickness affects spanners (not all of them)
> proportionally:
> http://www.lilypond.org/doc/v2.19/Documentation/notation/spanners
> but also ledger lines, stem thickness, beam length fraction, beam
> attachment... (others for sure)

It also seems to move the bar number down. Does anybody know why?

{
  \override Staff.StaffSymbol.thickness = 3
  a1 \break a
}

Cheers,
Joram

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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Thomas Morley
2016-01-31 17:31 GMT+01:00 Pierre Perol-Schneider
:
> Hi Kieren,
>
> I've never seen such list but it would be helpful.
> Apparently, StaffSymbol.thickness affects spanners (not all of them)
> proportionally:
> http://www.lilypond.org/doc/v2.19/Documentation/notation/spanners
> but also ledger lines, stem thickness, beam length fraction, beam
> attachment... (others for sure) in a less predictable multiplier:
>
> \version "2.19.35"
>
> \score {
>{
> \new GrandStaff <<
>   \new Staff { c'''16 c' c''' c' c''' c' }
>   \new Staff { c'''16 c' c''' c' c''' c' }
> >>
>   }
> }
> \markup\vspace #2
> \score {
>   {
> \new GrandStaff <<
>   \new Staff { c'''16\< c'\glissando c''' c'\startTrillSpan c'''
> c'\!\stopTrillSpan }
>   \new Staff { c'''16\startTextSpan c'~ c' c' c''' c'\stopTextSpan }
> >>
>   }
>   \layout {
> \context {
>   \Staff
>   \override StaffSymbol.thickness = 5
>   \override StaffSymbol.ledger-line-thickness = #'(0.13 . 0.13)
>   \override Stem.thickness = #0.25
>   \override Beam.length-fraction = #0.8
> }
>   }
> }
>
> Not sure if that helps though... :(
> Cheers,
> Pierre
>
>
>
> 2016-01-31 14:53 GMT+01:00 Kieren MacMillan :
>>
>> Hello all,
>>
>> I was just checking to see if anyone has an answer to my post of Jan 7:
>>
>> > Is there a single list somewhere in the documentation, of all the grobs
>> > whose sizes are tied to StaffSymbol.thickness?
>> > (Optimally, that list would also include each grob’s default
>> > multiplier/thickness.)
>>
>> Alternatively, if anyone knows a ways to adjust the staff line thickness
>> *without* triggering an increase in all the other related thicknesses, that
>> would be a great (perhaps better) way to solve the issue I’m currently
>> working on.
>>
>> Thanks,
>> Kieren.

Hi Kieren, Pierre,

currently I see no reasonable method to get such a list.

You may use
(1) Trial and error.  I know 
(2) Or the code below.
Though be aware: It's last ressort!
I'm not sure, whether I can recommend using it.
If you wanna try, please test _very_ thoroughly!!
It post-processes the stencil-expression. The function's arg is added
to the default value.

Though you'll notice a drawback while only changing
StaffSymbol.thickness: the SystemStartBar is not affected, so the
thicker staff-lines stick out a bit.

\version "2.19.35"

%% Using Pierre's example.

#(define (lists-map function ls)
"Apply @var{function} to @var{ls} and all of it sublists.
First it recurses over the children, then the function is applied to
@var{ls}."
(if (list? ls)
(set! ls (map (lambda (y) (lists-map function y)) ls))
ls)
(function ls))

#(define (affect-staff-symbol-stencil-thickness add-th)
  (lambda (grob)
(let* ((stil (ly:staff-symbol::print grob))
   (x-ext (ly:stencil-extent stil X))
   (y-ext (ly:stencil-extent stil Y))
   (stil-expr (ly:stencil-expr stil)))
  (ly:make-stencil
(lists-map
  (lambda (e)
   (if (and (list? e) (member 'draw-line e))
   (append (list 'draw-line (+ (cadr e) add-th)) (cddr e))
   e))
   stil-expr)
 x-ext
 y-ext

affectStaffSymbolStencilThickness =
#(define-music-function (add-thick)(number?)
#{
  \override Staff.StaffSymbol.stencil =
#(affect-staff-symbol-stencil-thickness add-thick)
#})

\paper {
  indent = 50
}

mus =
{ c'''16\< c'\glissando c''' c'\startTrillSpan c''' c'\!\stopTrillSpan }

\new Staff \with { instrumentName = "default" } \mus

\score {
  {
\new GrandStaff <<
  \new Staff
\with {
  instrumentName = "thick is increased 0.2 "
  \affectStaffSymbolStencilThickness #0.2
}
\mus
  \new Staff
\with {
  instrumentName = "thick is increased 0.4 "
  \affectStaffSymbolStencilThickness #0.4
}
\mus
  \new Staff
  \with {
instrumentName = "reverted "
\revert StaffSymbol.stencil
  }
  \mus
>>
  }
  \layout {
\context {
  \Staff
  %% general setting is also possible:
  %\affectStaffSymbolStencilThickness #0.4
}
  }
}

Cheers,
  Harm

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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Thomas Morley
2016-01-31 21:26 GMT+01:00 Noeck :
> Hi,
>
> Am 31.01.2016 um 17:31 schrieb Pierre Perol-Schneider:
>> Apparently, StaffSymbol.thickness affects spanners (not all of them)
>> proportionally:
>> http://www.lilypond.org/doc/v2.19/Documentation/notation/spanners
>> but also ledger lines, stem thickness, beam length fraction, beam
>> attachment... (others for sure)
>
> It also seems to move the bar number down. Does anybody know why?
>
> {
>   \override Staff.StaffSymbol.thickness = 3
>   a1 \break a
> }
>
> Cheers,
> Joram

Clearly a bug, please report.

Cheers,
  Harm

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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Kieren MacMillan
Hi Harm,

This is very helpful in one sense — thank you!

Ultimately, my goal is to be able to design stylesheets that match certain 
“house styles” (e.g., Hanle, Chappell & Co., Peters). I find that many 
plate-engraved scores appear to have a slightly heavier overall look to the 
staff lines, so I wanted to increase them without necessarily increasing the 
others proportionally.

Perhaps once I build a definitive list of all the grobs that are proportional 
to staff-line, I’ll simply have to include an inverse setting in each 
stylesheet where the proportional change doesn’t match the model I’m using for 
the stylesheet.

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Pierre Perol-Schneider
Hi Kieren,

I've never seen such list but it would be helpful.
Apparently, StaffSymbol.thickness affects spanners (not all of them)
proportionally:
http://www.lilypond.org/doc/v2.19/Documentation/notation/spanners
but also ledger lines, stem thickness, beam length fraction, beam
attachment... (others for sure) in a less predictable multiplier:

\version "2.19.35"

\score {
   {
\new GrandStaff <<
  \new Staff { c'''16 c' c''' c' c''' c' }
  \new Staff { c'''16 c' c''' c' c''' c' }
>>
  }
}
\markup\vspace #2
\score {
  {
\new GrandStaff <<
  \new Staff { c'''16\< c'\glissando c''' c'\startTrillSpan c'''
c'\!\stopTrillSpan }
  \new Staff { c'''16\startTextSpan c'~ c' c' c''' c'\stopTextSpan }
>>
  }
  \layout {
\context {
  \Staff
  \override StaffSymbol.thickness = 5
  \override StaffSymbol.ledger-line-thickness = #'(0.13 . 0.13)
  \override Stem.thickness = #0.25
  \override Beam.length-fraction = #0.8
}
  }
}

Not sure if that helps though... :(
Cheers,
Pierre


2016-01-31 14:53 GMT+01:00 Kieren MacMillan :

> Hello all,
>
> I was just checking to see if anyone has an answer to my post of Jan 7:
>
> > Is there a single list somewhere in the documentation, of all the grobs
> whose sizes are tied to StaffSymbol.thickness?
> > (Optimally, that list would also include each grob’s default
> multiplier/thickness.)
>
> Alternatively, if anyone knows a ways to adjust the staff line thickness
> *without* triggering an increase in all the other related thicknesses, that
> would be a great (perhaps better) way to solve the issue I’m currently
> working on.
>
> Thanks,
> Kieren.
> 
>
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: i...@kierenmacmillan.info
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


re: list of thicknesses affected by changing StaffSymbol.thickness

2016-01-31 Thread Kieren MacMillan
Hello all,

I was just checking to see if anyone has an answer to my post of Jan 7:

> Is there a single list somewhere in the documentation, of all the grobs whose 
> sizes are tied to StaffSymbol.thickness?
> (Optimally, that list would also include each grob’s default 
> multiplier/thickness.)

Alternatively, if anyone knows a ways to adjust the staff line thickness 
*without* triggering an increase in all the other related thicknesses, that 
would be a great (perhaps better) way to solve the issue I’m currently working 
on.

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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