On Thu, Sep 8, 2016 at 12:37 PM, David Nalesnik <david.nales...@gmail.com>
wrote:

> On Thu, Sep 8, 2016 at 1:04 PM, tisimst <tisimst.lilyp...@gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 8, 2016 at 11:52 AM, David Nalesnik [via Lilypond] <[hidden
> > email]> wrote:
> >
> >> On Thu, Sep 8, 2016 at 7:26 AM, David Nalesnik <[hidden email]> 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.
> >
>
> I'm not sure I follow
>
> Do you mean the threshold outside-staff position? (+/- 3.5 puts the
> beam a little above/below the staff.  It would be easy to add that as
> a function parameter.)


Yes. You hard-coded 3.5 into the function, but I would think that other
values (say 4.5 or 6.0) might be appropriate in different systems. It's all
theoretical for me, of course, but that's all I meant.

Best,
Abraham
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to