On Thu, Sep 8, 2016 at 11:52 AM, David Nalesnik [via Lilypond] <
ml-node+s1069038n194341...@n5.nabble.com> wrote:

> On Thu, Sep 8, 2016 at 7:26 AM, David Nalesnik <[hidden email]
> <http:///user/SendEmail.jtp?type=node&node=194341&i=0>> wrote:
>
> >
> > \version "2.19.46"
> >
> > #(define my-positions
> >    (lambda (grob)
> >      (let* ((stems (ly:grob-object grob 'stems))
> >             (first-stem (ly:grob-array-ref stems 0))
> >             (dir (ly:grob-property first-stem 'direction)))
> >        (if (eq? dir UP)
> >            (cons 3.5 3.5)
> >            (cons -3.5 -3.5)))))
> >
> > {
> >   \override Beam.positions = #my-positions
> >   d'16 [ r16  d'8 ] d'16 [ r16  d'8 ]
> >   d'16 [ r16  d'8 ] d''16 [ r16  d''8 ]
> >   d''16 [ r16  d''8 ] d'16 [ r16  d''8 ]
> >   d''16 [ r16  d''8 ] d'''16 [ r16  d'''8 ]
> >
> >   r16[d'' d'' d'']
> >   r16[d' d' d']
> > }
>
>
> The above sets positions to an arbitrary height outside of the staff.
> We need to consider that setting might be too low/high:
> \version "2.19.46"
>
> #(define my-positions
>    (lambda (grob)
>      (let* ((default-pos (beam::place-broken-parts-individually grob))
>             (left-pos (car default-pos))
>             (right-pos (cdr default-pos))
>             (stems (ly:grob-object grob 'stems))
>             (first-stem (ly:grob-array-ref stems 0))
>             (dir (ly:grob-property first-stem 'direction))
>             (new-pos
>              (if (eq? dir UP)
>                  (max 3.5 left-pos right-pos)
>                  (min -3.5 left-pos right-pos))))
>        (cons new-pos new-pos))))
>
> {
>   \override Beam.positions = #my-positions
>   d'16 [ r16  d'8 ] d'16 [ r16  d'8 ]
>   d'16 [ r16  d'8 ] d''16 [ r16  d''8 ]
>   d''16 [ r16  d''8 ] d'16 [ r16  d''8 ]
>   d''16 [ r16  d''8 ] d'''16 [ r16  d'''8 ]
>
>   r16[d'' d'' d'']
>   r16[d' f' a']
>   f'' d'' b' g'
>   \stemUp f'' d'' b' g'
>   \stemUp f''' d''' b'' g''
> }
>

Just a thought, but I wonder if my-positions should accept at least numeric
input since (I'm just guessing) this value could change from system to
system? Please ignore this if it doesn't apply.

--
Abraham Lee




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/always-set-beam-outside-of-staff-tp194316p194342.html
Sent from the User mailing list archive at Nabble.com.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to