[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
spanner question
From: |
David Stocker |
Subject: |
spanner question |
Date: |
Tue, 30 Jun 2009 23:28:10 -0400 |
User-agent: |
Thunderbird 2.0.0.22 (X11/20090608) |
Hello folks,
I have a question about a text spanner in a pre-defined variable.
In the snippet below, the first example does everything I want except
that in the first line of music, the spanner line doesn't extend to the
barline at the end of the line. I've achieved this by using two
pre-defined variables for the text spanner I want: one to start it, and
one to finish it with a terminal ending.
In the second example, the spanner extends to the end of the first line
of music (with a terminal ending that I *don't* want) and then, starts
too far to the left on the second line. The terminal ending at the
conclusion of the chord acts the way I want it to.
My goal is to define a single variable (perhaps a music function) that
will fulfill these requirements:
* Extends over multiple systems, extending to the last measure's
barline without the terminal ending
* Picks up at the beginning of subsequent lines with identical
positioning as the initiation of the spanner
* Dynamically adds a terminal ending to the end of the spanner
Has anyone worked on this issue already (possibly with a scheme function)?
Also, the final destination for this is most probably going to be a
"\include" file with many (dozens?) pre-defined variables for common
text spanners used in guitar music. If I achieve the results I hope for,
I plan to share it with the community.
Thanks,
David
Here's the snippet:
%%% begin ly snippet %%%
\version "2.13.1"
harmOn = {
\override Voice.NoteHead #'style = #'harmonic-mixed
\tieDashed
} %% Set harmonics to diamond noteheads with dashed ties
harmXII = {
\override TextSpanner #'(bound-details left text) = \markup { \teeny
\upright"Arm. XII " }
\once \override TextSpanner #'(bound-details right padding) = #-0.75
\once \override TextSpanner #'(bound-details left padding) = #-0.25
\once \override TextSpanner #'(bound-details left stencil-align-dir-y)
= #CENTER
}
harmXIIterm = {
\override TextSpanner #'(bound-details left text) = \markup { \teeny
\upright"Arm. XII " }
\override TextSpanner #'(bound-details right text) = \markup {
\draw-line #'(0 . -0.75) }
\once \override TextSpanner #'(bound-details right padding) = #-0.75
\once \override TextSpanner #'(bound-details left padding) = #-0.25
\once \override TextSpanner #'(bound-details left stencil-align-dir-y)
= #CENTER
}
exOne= {
\relative c' {
\harmOn
\harmXII
\textSpannerUp
\mark \markup { \bold "Example 1" }
<e a d g b e>1~ \startTextSpan | <e a d g b e>1 | <e a d g b e>1~ |
<e a d g b e>1 \stopTextSpan \break \harmXIIterm <e a d g b e>1~
\startTextSpan <e a d g b e> \stopTextSpan \bar "||"
}
}
exTwo = {
\relative c' {
\harmOn
\harmXIIterm
\textSpannerUp
\mark \markup { \bold "Example 2" }
<e a d g b e>1~ \startTextSpan | <e a d g b e>1 | <e a d g b e>1~ | <e a
d g b e>1 \break <e a d g b e>1~ <e a d g b e> \stopTextSpan \bar "||"
}
}
\score {
\exOne
}
\score {
\exTwo
}
%%% end ly snippet %%%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- spanner question,
David Stocker <=