lilypond-user
[Top][All Lists]
Advanced

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

Re: Barres and enclose-bounds


From: Phil Burfitt
Subject: Re: Barres and enclose-bounds
Date: Sun, 11 Jul 2010 13:20:39 +0100

Hi Paul,

Here's my barre function (takes care of breaks as well). Hope it can be of some help or at least give you some ideas...

barre = #(define-music-function (parser location padding text) (number? string?)
#{
\once \override TextSpanner #'font-size = #-0.5
\once \override TextSpanner #'padding = #$padding
\once \override TextSpanner #'(bound-details left text) = #$text
\once \override TextSpanner #'(bound-details left padding) = #-0.5
\once \override TextSpanner #'(bound-details left-broken text) = \markup { \null }
\once \override TextSpanner #'(bound-details left-broken padding) = #0
\once \override TextSpanner #'font-shape = #'upright
\once \override TextSpanner #'style = #'line

%\once \override TextSpanner #'style = #'dashed-line
%\once \override TextSpanner #'dash-period = #0.8
%\once \override TextSpanner #'dash-fraction = #0.2

\once \override TextSpanner #'(bound-details left stencil-align-dir-y) = #CENTER \once \override TextSpanner #'(bound-details right text) = \markup { \draw-line #'(0 . -0.4) }
\once \override TextSpanner #'(bound-details right padding) = #-1.0
\once \override TextSpanner #'(bound-details right-broken text) = \markup { \null }
\once \override TextSpanner #'(bound-details right-broken padding) = #0
#})

startBarre = \startTextSpan
stopBarre = \stopTextSpan



To use: \barre #4 "CV" (first argument = vertical padding, second argument = barre text)

Example:

\relative c' = {
   \stemDown
   \barre #4 "CV "
   a'\startBarre c e a\stopBarre
}

If you prefer dotted/dashed lines then you can uncomment the style, dash-period and dash-fraction lines.

Hope it helps.

Phil.



----- Original Message ----- From: "paulxiii" <address@hidden>
To: <address@hidden>
Sent: Sunday, July 11, 2010 12:41 PM
Subject: Re: Barres and enclose-bounds



Thanks. I changed the version number a few times until I got some meaningful
output from convert-ly. It couldn't do the whole job, but it gave an
indication as to what needed to be changed. I've ended up with the
following, which may be of help to others:

barre = #(define-music-function (parser location str)(string?)
   #{
      \once \override Voice . TextSpanner #'direction = #1
      \once \override Voice . TextSpanner #'style = #'line
      \once \override Voice . TextSpanner #'(bound-details right text) =
\markup { \draw-line #'(0 . -0.5) }
      \once \override Voice . TextSpanner #'(bound-details left text) =
#(markup (format "c~a" $str))
   #})

This works.

<< { <e''-4>4 <dis''-4> <cis''-4> | } \\
    \override StringNumber #'extra-offset = #'(0.0 . -2.5)
    \once \override Voice.TextSpanner #'padding = #'5.5
{ \barre #"IX" <cis'-3\4>8\startTextSpan <e'-1\3> <b-1\4> e'\stopTextSpan
    \once \override Voice.TextSpanner #'padding = #'4.0
    \barre #"VII" <a-1\4>\startTextSpan <fis'-1\2>\stopTextSpan | } >>

http://old.nabble.com/file/p29131041/tostretch.png

My next exercise will be to see if I can adjust the width of the barre, as I
would like it to span to the outside edge of the note head, and not the
centre line, but I'll try figure that out before asking the question here.

Paul

P.S. I seem to have a different username now. Oh well. Getting the hang of
things.


-Eluze wrote:

convert-ly could be of help, see
http://lilypond.org/doc/v2.12/Documentation/user/lilypond-program-big-page
Application Usage

hth


--
View this message in context: http://old.nabble.com/Barres-and-enclose-bounds-tp29129706p29131041.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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