On 23.09.2015 01:20, David Kastrup wrote:
Simon Albrecht <simon.albre...@mail.de> writes:
I made an essay on a simpler input interface, which redefines
\startTextSpan as a music function. That would be much preferable at
least in my eyes. What do you think?
(I hope there wouldn’t be any merge conflicts here…)
However, I’m having a problem with this syntax: the attached file
gives lots of
"text-spanner-inner-text-lyric-mode.ly:615:5: error: wrong type for
argument 3. Expecting music, found #<Music function #<procedure #f
(arg)>>
c1
\startTextSpan \lyricmode { ral -- len -- tan -- do }"
upon compiling. And I don’t know what my mistake would be…
It's the last line before %%% EXAMPLES where you enter some strange
recursion. You probably should first save the old value of
\startTextSpan in some differently named variable and use that. But
really: reusing an existing command name is a bad idea to start with.
I think it’s eventually a good idea to replace the definition of
\startTextSpan, firstly because it’s the most convenient sort of
interface for this custom function. And secondly: _Any_ sensible use of
text spanners now requires a quite complicated \override, even most
common cases:
%%%%%%%%%%%
\relative {
\override TextSpanner.bound-details.left.text = "rit."
b'1\startTextSpan
e,\stopTextSpan
}
%%%%%%%%%%%
Being able to input the same as
%%%%%%%%%%%
\relative {
b'1\startTextSpan \lyricmode { rit. }
e,\stopTextSpan
}
%%%%%%%%%%%
would be a huge improvement IMO.
I think it’s not often that one only needs a text to end the spanner, so
\startTextSpan \lyricmode { "" -- "back to normal" }
would be acceptable.
Drawback: it’s impossible to provide backward compatibility then, isn’t it?
But you were right and storing the default value in an extra variable
solved the problem. I overlooked that I was introducing a recursion
instead of redefining a variable. Thanks.
Yours, Simon
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user