Re: Horizontal beam parallel to staff

2021-05-11 Thread Ahanu Banerjee
Thank you both, very helpful!

Cheers,
-Ahanu

On Tue, May 11, 2021, 01:02 Aaron Hill  wrote:

> On 2021-05-10 9:10 pm, Pierre Perol-Schneider wrote:
> > Hi Ahanu,
> > How about:
> >
> > \version "2.20.0"
> > {
> >   %\override Beam.damping = #5
> >   \override Beam.positions = #'(5 . 5)
> >   g''8 b b c'' c'' b b g''
> > }
>
> And for an automated approach:
>
> 
> \version "2.22.0"
>
> #(define NEAR -1)
> #(define FAR 1)
> flattenPositions =
> #(define-scheme-function
>(rel-pos) (number?)
>(grob-transformer 'positions
> (lambda (grob orig)
>  (let* ((dir (ly:grob-property grob 'direction))
> (ys (ordered-cons (car orig) (cdr orig)))
> (y (interval-index ys (* dir rel-pos
>   (cons y y)
>
> {
>\override Beam.positions = \flattenPositions #NEAR
>g''8 b b c'' a' b'' b'' d'
>\override Beam.positions = \flattenPositions #CENTER
>g''8 b b c'' a' b'' b'' d'
>\override Beam.positions = \flattenPositions #(* 2 FAR)
>g''8 b b c'' a' b'' b'' d'
> }
> 
>
>
> -- Aaron Hill
>


Re: Horizontal beam parallel to staff

2021-05-11 Thread Jean Abou Samra


Le 11/05/2021 à 04:03, Ahanu Banerjee a écrit :
I know it is not standard practice, but I am looking for a way to make 
beams parallel to staff despite the noteheads on either side of the 
beam having different vertical positions on the staff.


Setting beam damping to a high value reduces the slope substantially, 
but it doesn't go to zero. Can someone suggest a way to do this?


\version "2.20.0"
{ \override Beam.damping = #5
  g''8 b b c'' c'' b b g'' }


Thanks,
-Ahanu



Hello,

\override Beam.damping = #+inf.0 is supposed to do the trick. A bug that 
used to prevent it from working in all cases (not this one though) was 
fixed in version 2.21.0 
(https://gitlab.com/lilypond/lilypond/-/issues/1493).


{
  \override Beam.damping = #+inf.0
  g''8 b b c'' c'' b b g''
}

Best,
Jean



Re: Horizontal beam parallel to staff

2021-05-10 Thread Aaron Hill

On 2021-05-10 9:10 pm, Pierre Perol-Schneider wrote:

Hi Ahanu,
How about:

\version "2.20.0"
{
  %\override Beam.damping = #5
  \override Beam.positions = #'(5 . 5)
  g''8 b b c'' c'' b b g''
}


And for an automated approach:


\version "2.22.0"

#(define NEAR -1)
#(define FAR 1)
flattenPositions =
#(define-scheme-function
  (rel-pos) (number?)
  (grob-transformer 'positions
   (lambda (grob orig)
(let* ((dir (ly:grob-property grob 'direction))
   (ys (ordered-cons (car orig) (cdr orig)))
   (y (interval-index ys (* dir rel-pos
 (cons y y)

{
  \override Beam.positions = \flattenPositions #NEAR
  g''8 b b c'' a' b'' b'' d'
  \override Beam.positions = \flattenPositions #CENTER
  g''8 b b c'' a' b'' b'' d'
  \override Beam.positions = \flattenPositions #(* 2 FAR)
  g''8 b b c'' a' b'' b'' d'
}



-- Aaron Hill



Re: Horizontal beam parallel to staff

2021-05-10 Thread Pierre Perol-Schneider
Hi Ahanu,
How about:

\version "2.20.0"
{
  %\override Beam.damping = #5
  \override Beam.positions = #'(5 . 5)
  g''8 b b c'' c'' b b g''
}

Cheers,
Pierre

Le mar. 11 mai 2021 à 04:04, Ahanu Banerjee  a
écrit :

> I know it is not standard practice, but I am looking for a way to make
> beams parallel to staff despite the noteheads on either side of the beam
> having different vertical positions on the staff.
>
> Setting beam damping to a high value reduces the slope substantially, but
> it doesn't go to zero. Can someone suggest a way to do this?
>
> \version "2.20.0"
> { \override Beam.damping = #5
>   g''8 b b c'' c'' b b g'' }
>
>
> Thanks,
> -Ahanu
>


Horizontal beam parallel to staff

2021-05-10 Thread Ahanu Banerjee
I know it is not standard practice, but I am looking for a way to make
beams parallel to staff despite the noteheads on either side of the beam
having different vertical positions on the staff.

Setting beam damping to a high value reduces the slope substantially, but
it doesn't go to zero. Can someone suggest a way to do this?

\version "2.20.0"
{ \override Beam.damping = #5
  g''8 b b c'' c'' b b g'' }


Thanks,
-Ahanu