For guitar scores you might like these as well. Very similar functions for
harmonics and string number indications over multiple notes.
Nick
> -----Original Message-----
> From: Jonathan Kulp [mailto:[email protected]]
> Sent: Saturday, 25 April 2009 21:47
> To: Nick Payne
> Cc: 'Allan Spagnol Comar'; [email protected]
> Subject: Re: Bug on markups migrating from 2.10 to 2.12
>
> Nick Payne wrote:
> > I have attached the barre and half barre functions I use that work
> with
> > 2.12, and your test.ly modified to use them.
> >
> > Nick
> >
>
> Those are nice barre indicators, Nick. Thanks. :)
% usage e.g.:
% \harmonics "harm. 8va " #0 #'(0 . -0.5) #5 #1
% <g,-2>\startTextSpan <c-3> <bf'-4>-> <ef,-1> <af-1>-> <c,-3> g c bf'-> ef, af-> c,\stopTextSpan
harmonics = #(define-music-function (parser location text osp shorten adjBreak adjEnd) (string? number? pair? number? number?) #{
% set osp to 999 if spanner is colliding with another element
% this will position the spanner outside all other elements
% can be normally be set to zero
\once \override TextSpanner #'outside-staff-priority = #$osp
\once \override TextSpanner #'bound-details #'left #'text = \markup { \teeny $text }
% setup dashed line and draw a bracket edge on RHS
\once \override TextSpanner #'dash-period = #1.5
\once \override TextSpanner #'dash-fraction = #0.6
\once \override TextSpanner #'thickness = #0.8
\once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -0.5) }
% set alignment of line with reference to left text
\once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
\once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten)
\once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten)
% allow adjustment of line end when it wraps to following stave
\once \override TextSpanner #'bound-details #'right-broken #'padding = #$adjEnd
% adjust LH end of line when it wraps to following stave so that it doesn't
% extend to the left of the notes on the stave
\once \override TextSpanner #'bound-details #'left-broken #'X = #$adjBreak
% optional override to remove text and bracket edge at line breaks
% \once \override TextSpanner #'bound-details #'left-broken #'text = ##f
\once \override TextSpanner #'bound-details #'right-broken #'text = ##f
#})
% usage e.g.:
% \stringUp "2" #0 #'(0 . -0.5) #5 #1
% <g,-2>\startTextSpan <c-3> <bf'-4>-> <ef,-1> <af-1>-> <c,-3> g c bf'-> ef, af-> c,\stopTextSpan
stringUp = #(define-music-function (parser location stringnum osp shorten adjBreak adjEnd) (string? number? pair? number? number?) #{
% set osp to 999 if spanner is colliding with another element
% this will position the spanner outside all other elements
% can be normally be set to zero
\once \override TextSpanner #'outside-staff-priority = #$osp
\once \override TextSpanner #'bound-details #'left #'text = \markup \bold { \teeny \concat { \circle { \finger $stringnum } " " } }
\once \override TextSpanner #'font-shape = #'upright
% setup dashed line and draw a bracket edge on RHS
\once \override TextSpanner #'dash-period = #0.8
\once \override TextSpanner #'dash-fraction = #0.6
\once \override TextSpanner #'thickness = #0.8
\once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -0.5) }
% set alignment of line with reference to left text
\once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
\once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten)
\once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten)
% allow adjustment of line end when it wraps to following stave
\once \override TextSpanner #'bound-details #'right-broken #'padding = #$adjEnd
% adjust LH end of line when it wraps to following stave so that it doesn't
% extend to the left of the notes on the stave
\once \override TextSpanner #'bound-details #'left-broken #'X = #$adjBreak
% optional override to remove text and bracket edge at line breaks
% \once \override TextSpanner #'bound-details #'left-broken #'text = ##f
\once \override TextSpanner #'bound-details #'right-broken #'text = ##f
#})
% usage e.g.:
% \stringDn "2" #0 #'(0 . -0.5) #5 #1
% <g,-2>\startTextSpan <c-3> <bf'-4>-> <ef,-1> <af-1>-> <c,-3> g c bf'-> ef, af-> c,\stopTextSpan
stringDn = #(define-music-function (parser location stringnum osp shorten adjBreak adjEnd) (string? number? pair? number? number?) #{
% set osp to 999 if spanner is colliding with another element
% this will position the spanner outside all other elements
% can be normally be set to zero
\once \override TextSpanner #'outside-staff-priority = #$osp
\once \override TextSpanner #'direction = #DOWN
\once \override TextSpanner #'bound-details #'left #'text = \markup \bold { \teeny \concat { \circle { \finger $stringnum } " " } }
\once \override TextSpanner #'font-shape = #'upright
% setup dashed line and draw a bracket edge on RHS
\once \override TextSpanner #'dash-period = #0.8
\once \override TextSpanner #'dash-fraction = #0.6
\once \override TextSpanner #'thickness = #0.8
\once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . 0.5) }
% set alignment of line with reference to left text
\once \override TextSpanner #'bound-details #'left #'stencil-align-dir-y = #CENTER
\once \override TextSpanner #'bound-details #'left #'padding = #(car $shorten)
\once \override TextSpanner #'bound-details #'right #'padding = #(cdr $shorten)
% allow adjustment of line end when it wraps to following stave
\once \override TextSpanner #'bound-details #'right-broken #'padding = #$adjEnd
% adjust LH end of line when it wraps to following stave so that it doesn't
% extend to the left of the notes on the stave
\once \override TextSpanner #'bound-details #'left-broken #'X = #$adjBreak
% optional override to remove text and bracket edge at line breaks
% \once \override TextSpanner #'bound-details #'left-broken #'text = ##f
\once \override TextSpanner #'bound-details #'right-broken #'text = ##f
#})
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user