lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: review of a Mutopia file (why TabStaff gives error here?)


From: Nick Payne
Subject: Re: review of a Mutopia file (why TabStaff gives error here?)
Date: Mon, 26 Nov 2012 11:26:21 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 24/11/12 13:34, Keith OHara wrote:
barre = #(define-music-function (parser location
    strg music) (number? ly:music?)
    #{
      \set TabStaff.minimumFret = $strg
      \set TabStaff.restrainOpenStrings = ##t
      \once\override TextSpanner #'(bound-details left text)
            = #(format #f "B address@hidden" strg)
       %{ ... Nick's other style settings ...%}
      <>\startTextSpan
      $music
      <>\stopTextSpan
      \unset TabStaff.minimumFret
      \unset TabStaff.restrainOpenStrings
    #})

I was testing this barre function without the tabstaff stuff for use with scores in standard notation, and added a few extra TextSpanner settings to get the output that I want. One problem that I can't fathom is that if I add \override TextSpanner.bound-details.right-broken.text = ##f, so that the small vertical line at the RH end of the spanner is not drawn at the end of a staff when the barre wraps to the following staff, then the line also doesn't get drawn if the barre ends at the right hand end of a staff, without being broken. Why is lilypond thinking that the TextSpanner is breaking across staves when it isn't? In the example below, the end of the second TextSpanner is missing the vertical line unless the override of TextSpanner.bound-details.right-broken.text = ##f is commented out.

\version "2.17.6"

% Function contributed by Thomas Morley:
% http://lsr.dsi.unimi.it/LSR/Item?id=857
barre =
#(define-music-function (parser location strg music)(number? ly:music?)
#{
%    \set TabStaff.minimumFret = $strg
%    \set TabStaff.restrainOpenStrings = ##t
\once\override TextSpanner.bound-details.left.text = #(format #f "address@hidden" strg)
  \once\override TextSpanner.font-shape = #'upright
\once\override TextSpanner.bound-details.left.stencil-align-dir-y = #CENTER
  \once\override TextSpanner.style = #'line
\once\override TextSpanner.bound-details.right.text = \markup \draw-line #'(0 . -1)
  \once\override TextSpanner.to-barline = ##t
  \once\override TextSpanner.bound-details.right.padding = #1.5
  \once\override TextSpanner.bound-details.right-broken.padding = #0.5
  \once\override TextSpanner.bound-details.left-broken.padding = #2
  \once\override TextSpanner.bound-details.left-broken.text = ##f
  \once\override TextSpanner.bound-details.right-broken.text = ##f
  <>\startTextSpan
  $music
  <>\stopTextSpan
%    \unset TabStaff.minimumFret
%    \unset TabStaff.restrainOpenStrings
#})

\relative c'' {
  \key c \major
  \barre3 { \repeat unfold 48 { d4 } }
  \barre3 { \repeat unfold 20 { d4 } }
  \break
  \repeat unfold 20 { d4 }
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]