[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Note duration line (contemporary)
From: |
Thomas Morley |
Subject: |
Re: Note duration line (contemporary) |
Date: |
Wed, 28 Nov 2012 23:41:07 +0100 |
2012/11/28 Jeffrey Trevino <address@hidden>:
> Hi all,
>
> It's good to know how to do this. For metric notation, I found that it's
> also useful to stop the duration line before the barline, instead of
> continuing it to a subsequent notehead, if the following note is in the next
> bar:
>
>
> #(define flat-gliss
> (lambda (grob)
> (let ((left-Y (assoc-get 'Y (ly:grob-property grob 'left-bound-info))))
> (ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y))))
>
> \relative c'' {
> \override Glissando #'after-line-breaking = #flat-gliss
> \override Glissando #'thickness = #8
> \override Glissando #'to-barline = ##t
>
> c1\glissando
> g'\glissando
> g,
> }
>
> There's one more important tweak, remaining, though, and I can't figure it
> out: Is there a way to make the ends of the lines square instead of round? I
> don't see a property for this in line-interface.
>
> best,
> Jeff
AFAIK, there is none.
But you can construct a new stencil via `make-filled-box-stencilĀ“
\version "2.17.6"
#(define flat-gliss
(lambda (grob)
(let* ((left-Y (assoc-get 'Y (ly:grob-property grob 'left-bound-info)))
(stencil (ly:line-spanner::print grob))
(stencil-x-ext (ly:stencil-extent stencil X))
(line-thickness (ly:staff-symbol-line-thickness grob))
(staff-space (ly:staff-symbol-staff-space grob))
(half-gliss-thick (- (/ staff-space 2) line-thickness))
(new-stencil (make-filled-box-stencil
(interval-widen stencil-x-ext (* line-thickness 1))
(interval-widen (cons left-Y left-Y)
half-gliss-thick))))
(ly:grob-set-property! grob 'stencil new-stencil)
(ly:grob-set-nested-property! grob '(right-bound-info Y) left-Y))))
\relative c'' {
\override Glissando #'after-line-breaking = #flat-gliss
\override Glissando #'to-barline = ##t
c1\glissando
g'\glissando
g,
f'2\glissando
e'
}
Please note: I hardcoded the Glissando-thickness depending on
staff-space and staff-symbol-line-thickness.
This could be done for 'to-barline, too.
Or create a function to gain more flexibility.
Cheers,
Harm
- Note duration line (contemporary), Jethro Van Thuyne, 2012/11/21
- Re: Note duration line (contemporary), Nick Baskin, 2012/11/21
- Re: Note duration line (contemporary), Oscar Dub, 2012/11/27
- Re: Note duration line (contemporary), David Nalesnik, 2012/11/27
- Re: Note duration line (contemporary), Jeffrey Trevino, 2012/11/28
- Re: Note duration line (contemporary), Oscar Dub, 2012/11/28
- Re: Note duration line (contemporary),
Thomas Morley <=
- Re: Note duration line (contemporary), Jeffrey Trevino, 2012/11/28
- Re: Note duration line (contemporary), Thomas Morley, 2012/11/28
- Re: Note duration line (contemporary), Paul Morris, 2012/11/29
- Re: Note duration line (contemporary), David Nalesnik, 2012/11/29
- Re: Note duration line (contemporary), David Nalesnik, 2012/11/29
- Re: Note duration line (contemporary), Matthew Probst, 2012/11/29
- Re: Note duration line (contemporary), Jeffrey Trevino, 2012/11/29
- Re: Note duration line (contemporary), Olivier Biot, 2012/11/29
- Re: Note duration line (contemporary), Matthew Probst, 2012/11/29