Il 18/11/2012 18:10, Thomas Morley ha scritto:
So see my own coding below.

\version "2.16.0"

barre =
#(define-music-function (parser location strg music)(string? ly:music?)
    (let ((arg (string-append "B " strg)))
       #{
          \override TextSpanner #'(bound-details left text) = $arg

          #(let ((elts (ly:music-property music 'elements)))
               (make-music 'SequentialMusic 'elements
                  (append
                     (list (make-music 'TextSpanEvent 'span-direction -1))
                     (reverse (cdr (reverse elts)))
                     (list (make-music 'TextSpanEvent 'span-direction 1))
                     (list (last elts)))))
       #}))

\relative c' {
         \barre I { c4  d e f }
         \barre II { g a b c }
}

Wonderful!
It reduces the width of the lines in the input and it's also more user-friendly.

Can you add it to the LSR?
.. maybe you have to wait for the LSR to be upgraded to 2.16?

I think that I'll use this snippet for a Mutopia file I'm updating to 2.16

Best,
--
Federico

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to