[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: always set beam outside of staff
From: |
David Nalesnik |
Subject: |
Re: always set beam outside of staff |
Date: |
Thu, 8 Sep 2016 13:37:19 -0500 |
On Thu, Sep 8, 2016 at 1:04 PM, tisimst <address@hidden> 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.)
david
- Re: always set beam outside of staff, (continued)
- Re: always set beam outside of staff, Jacques Menu Muzhic, 2016/09/08
- Re: always set beam outside of staff, Michael Winter, 2016/09/08
- Re: always set beam outside of staff, David Nalesnik, 2016/09/08
- Re: always set beam outside of staff, David Nalesnik, 2016/09/08
- Re: always set beam outside of staff, Michael Winter, 2016/09/08
- Re: always set beam outside of staff, David Nalesnik, 2016/09/08
- Re: always set beam outside of staff, David Nalesnik, 2016/09/08
- Re: always set beam outside of staff, Michael Winter, 2016/09/08
- Re: always set beam outside of staff, Michael Winter, 2016/09/08
- Re: always set beam outside of staff, tisimst, 2016/09/08
- Re: always set beam outside of staff,
David Nalesnik <=
- Re: always set beam outside of staff, Abraham Lee, 2016/09/08
Re: always set beam outside of staff, Thomas Morley, 2016/09/08