Hopefully this doesn't appear twice - my ISP has been having some e-mail problems and I don't know if it got sent on the 1st attempt...
Neil Thanks. I used your function definition in a short test and it worked just as I wanted. Strangely, however, when I copied and pasted the function into the piece I'm engraving, I just get a dashed line where I should see the barring indication, and I can't see why it works with one and not the other. Foo.ly and foo.png - test and output as expected. Barrios.ly and barrios.png - shows only a dashed line over bar 7 where the barre indication should be. Can anyone shed some light on this? Nick -----Original Message----- From: Neil Puttock [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 September 2008 06:12 To: Kieren MacMillan Cc: Nick Payne; Mailinglist lilypond-user Subject: Re: Questions on beaming and barring 2008/9/17 Kieren MacMillan <[EMAIL PROTECTED]>: > Usually, I would suggest running convert-ly, but that appears not to work on > this file for some reason (which I'm too busy to figure out right now) — > instead, I manually updated the following function definition for you: Some of the changes to line spanners in 2.11 were too involved for automatic conversion using convert-ly. > barre = #(define-music-function (parser location padding text shorten) > (number? string? pair?) > #{ > \once \override TextSpanner #'dash-fraction = #1 > \once \override TextSpanner #'font-shape = #'upright > \once \override TextSpanner #'edge-height = #'(0 . 1) > \once \override TextSpanner #'padding = #$padding > \once \override TextSpanner #'bound-details #'left #'text = #$text > \once \override TextSpanner #'shorten-pair = $shorten > #}) Edge-height and shorten-pair don't work with spanners any more. To add bracket edges you have to draw lines in 'bound-details using markup instead. barre = #(define-music-function (parser location padding text shorten) (number? string? pair?) #{ \once \override TextSpanner #'style = #'line \once \override TextSpanner #'font-shape = #'upright %draw a bracket edge on RHS \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -1) } \once \override TextSpanner #'padding = $padding \once \override TextSpanner #'bound-details #'left #'text = $text % 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) % optional overrides 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 #}) Regards, Neil
#(set-default-paper-size "a4") \version "2.11.58" barre = #(define-music-function (parser location padding text shorten) (number? string? pair?) #{ \once \override TextSpanner #'style = #'line \once \override TextSpanner #'font-shape = #'upright %draw a bracket edge on RHS \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -1) } \once \override TextSpanner #'padding = $padding \once \override TextSpanner #'bound-details #'left #'text = $text % 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) % optional overrides 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 #}) \header { composer = \markup \center-column { "AgustÃn Barrios Mangoré" \small "(1885-1944)" } title = "Prelude in C minor" } % Treble voice #(define RH rightHandFinger) up = \relative c' { \textSpannerUp \set fingeringOrientations = #'(left) \set strokeFingerOrientations = #'(right) \set stringNumberOrientations= #'(down) \set tupletSpannerDuration = #(ly:make-moment 1 4) \times 4/6 { <c-1-\RH #1 >16 <g'-0-\RH #2 > <aes'-4-\RH #4 >-> <ees-3-\RH #3 > <g-2-\RH #4 >-> <g,-0-\RH #2 > <c,-\RH #1 > <g'-\RH #2 > <aes'-\RH #4 >-> <ees-\RH #3 > <g-\RH #4 >-> <g,-\RH #2 > | %1 <b,-1>^\markup { \small {\italic { simile la main droit } } } <g'-0> <aes'-4>-> <d,-3> <g-2>-> <g,-0> b, g' aes'-> d, g-> g, | %2 <d-0> <g-0> <g'-3>-> <b,-0> <f'-1>-> <g,-0> d g g'-> b, f'-> g, | %3 <c,-1> <g'-2\4> <f'-4\2>-> <c-3\3> <ees-1\2>-> <g,-2\4> c, g' f'-> c ees-> g, | %4 <bes,-3> <g'-0> <f'-4>-> <c-2> <ees-1>-> <g,-0> bes, g' f'-> c ees-> g, | %5 <a,-0> <fis'-2> <ees'-3>-> <bes-4> <d-1>-> <fis,-2> a, fis' ees'-> bes d-> fis, | %6 \barre #0.0 "CIV" #'(0 . 0) <aes,-1> <fis'-2\4> <ees'-3\2>-> <c-4\3> <d-4>->\startTextSpan <fis,-1> <aes,-1> <fis'-1> <ees'-1>-> <c-2>\stopTextSpan <d-1>-> <fis,-3> | %7 <g,-1> <g'-3\4> <ees'-2\2>-> <c-4\3> <d-1\2>-> <g,-3\4> g, g' ees'-> c d-> g, | %8 <g,-1> <f'!-1> <ees'-2>-> <c-3> <d-1>-> <f,-1> g, f' ees'-> c d-> f, | %9 <g,-1> <ees'-4\5> <d'-1>-> <g,-2\4> <c-3\3>-> <ees,-4> g, ees' d'-> g, c-> ees, | %10 <g,-1> <d'-3> <c'-4>-> <f,-1> <bes-1>-> <d,-3> g, d' c'-> f, bes-> d, | %11 <g,-2> <c-3> <bes'-4>-> <ees,-1> <aes-1>-> <c,-3> g c bes'-> ees, aes-> c, | %12 <g-3> <b-2> <aes'-1>-> <d,-0> <g-0>-> <b,-2> g b aes'-> d, g-> b, | %13 <f-1> <d'-0> <d'-4>-> <g,-0> <b-0>-> <d,-0> f, d' d'-> g, b-> d, | %14 e, <g'-0> <g'-4>-> <bes,-3> <des-2>-> <g,-0> e, <bes''-3> <aes'-4>-> <des,-2> <g-4>-> <bes,-3> | %15 <f,-1> <aes'-1> <g'-4>-> <c,-1> <f-1>-> <aes,-1> <f-3> aes g'-> c, f-> aes, | %16 <ees-1> <aes-1> <aes'-4>-> <c,-1> <f-1>-> <aes,-1> ees aes aes'-> c, f-> aes, | %17 <d,-0> <f'-3\3> <ees'-4>-> <aes,-2\2> <c-1\1>-> <f,-3> d, f' ees'-> aes, c-> f, | %18 } } % Bass voice down = \relative c' { c4 c | %1 b b | %2 d d | %3 c c | %4 bes bes | %5 a a | %6 aes aes | %7 g g | %8 g g | %9 g g | %10 g g | %11 g g | %12 g g | %13 f f | %14 e e | %15 f f' | %16 e e | %17 d d | %18 } thescore = \score { << \context Staff = guitar { \clef treble \key c \minor \time 2/4 \tempo "Moderato" \override Staff.NoteCollision #'merge-differently-headed = ##t << \context Voice = "1" { \voiceOne \up } \context Voice = "2" { \voiceTwo \down } >> } >> } \score { \thescore }
#(set-default-paper-size "a4") \version "2.11.58" barre = #(define-music-function (parser location padding text shorten) (number? string? pair?) #{ \once \override TextSpanner #'style = #'line \once \override TextSpanner #'font-shape = #'upright %draw a bracket edge on RHS \once \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'(0 . -1) } \once \override TextSpanner #'padding = $padding \once \override TextSpanner #'bound-details #'left #'text = $text % 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) % optional overrides 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 #}) \score { \relative c'' { \textSpannerUp \barre #0 "CIV" #'(0 . 0) c,8\startTextSpan d e f g a b c\stopTextSpan c, d e f g a b c c, d e f g a b c } }
<<attachment: barrios.png>>
<<attachment: foo.png>>
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user