Re: Height of start bar brace

2015-05-27 Thread Pierre Perol-Schneider
Hi Joram,

2015-05-26 14:46 GMT+02:00 Noeck noeck.marb...@gmx.de:

 Dear Pierre,

 thanks for looking into this. However, I don't understand what you tell
 me here. If I run your code, I see that it does *not* automatically
 scale the brace but it is rather odd: too small or too big.

 Cheers,
 Joram


See:

2015-04-26 23:42 GMT+02:00 Nathan Ho when.possi...@gmail.com:


 For some reason this solution doesn't automatically center the bracket
 perfectly, but it's a start.


So I slightly change Nathan's code so that it 'centers' automatically, no
matter what scaling is (crazy scalings were just to show up).
As far as I understood, brace scale setting depends on you, doesn't it?
E.g. #0.99 :

%% =
http://lilypond.1069038.n5.nabble.com/Height-of-start-bar-brace-td175422.html

\version 2.19.16

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.99)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c'1 }
\new Staff { c'''1 }
  

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.99)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c1 }
\new Staff { c1 }
  

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.99)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c,1 }
\new Staff { c'1 }
  

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.99)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c,,1 }
\new Staff { c''1 }
  


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


Re: Height of start bar brace

2015-05-27 Thread Noeck
Hi Pierre,

now it makes sense to me. Thanks for the explanation. Once I know how to
use it correctly, I see that this is perfectly what I was looking for.

Thanks,
Joram

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


Re: Height of start bar brace

2015-05-26 Thread Noeck
Dear Pierre,

thanks for looking into this. However, I don't understand what you tell
me here. If I run your code, I see that it does *not* automatically
scale the brace but it is rather odd: too small or too big.

Cheers,
Joram

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


Re: Height of start bar brace

2015-05-24 Thread Pierre Perol-Schneider
Hi Joram,
Hi Nathan,

This seems to work automatically:

\version 2.19.20

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.2)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff {c'1 }
\new Staff { c'''1 }
  

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.5)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c1 }
\new Staff { c1 }
  

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 0.9)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c,1 }
\new Staff { c'1 }
  

\new PianoStaff
  \with {
\override SystemStartBrace.stencil =
  #(lambda (grob)
 (let* ((scale-amount 1.5)
(stil (ly:system-start-delimiter::print grob))
(scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
(extent (ly:stencil-extent stil Y))
(height (- (cdr extent) (car extent
   (ly:stencil-translate-axis
 scaled-stil
   (* -0.5 (- 1 scale-amount) (+ height 3.5))
 Y)))
  }
  
\new Staff { c,,1 }
\new Staff { c''1 }
  

Cheers,
Pierre


2015-04-27 9:26 GMT+02:00 Noeck noeck.marb...@gmx.de:

 Thanks, Nathan, that works.

 ___
 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: Height of start bar brace

2015-04-27 Thread Noeck
Thanks, Nathan, that works.

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


Re: Height of start bar brace

2015-04-26 Thread Nathan Ho
On Sun, Apr 26, 2015 at 12:45 PM, Noeck noeck.marb...@gmx.de wrote:

 Hi,

 can I change the height of a start bar brace, like in

 \version 2.19.16
 \new PianoStaff 
   \new Staff { R1 }
   \new Staff { R1 }
 

 I would like to reduce the vertical size a little bit.


For some reason this solution doesn't automatically center the bracket
perfectly, but it's a start.

\version 2.19.16

\new PianoStaff \with {
  \override SystemStartBrace.stencil =
#(lambda (grob)
   (let* ((scale-amount 0.9)
  (stil (ly:system-start-delimiter::print grob))
  (scaled-stil (ly:stencil-scale stil scale-amount
scale-amount))
  (extent (ly:stencil-extent stil Y))
  (height (- (cdr extent) (car extent
 (ly:stencil-translate-axis
   scaled-stil
   (+
 (* -0.5 (- 1 scale-amount) height)
 -0.3) ; adjust this to nudge it
   Y)))
} 
  \new Staff { R1 }
  \new Staff { R1 }


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


Height of start bar brace

2015-04-26 Thread Noeck
Hi,

can I change the height of a start bar brace, like in

\version 2.19.16
\new PianoStaff 
  \new Staff { R1 }
  \new Staff { R1 }


I would like to reduce the vertical size a little bit.

Cheers,
Joram


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