lilypond-user
[Top][All Lists]
Advanced

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

Re: Text centralized above a TextSpan


From: David Nalesnik
Subject: Re: Text centralized above a TextSpan
Date: Mon, 21 Sep 2015 11:13:06 -0500



On Mon, Sep 21, 2015 at 8:41 AM, David Kastrup <address@hidden> wrote:
David Nalesnik <address@hidden> writes:

> Here's a preliminary experiment with using \lyricmode as an input device
> for text spanner details.  It could easily be incorporated into the larger
> function, but I've pared this down to ask a question.
>
> Is it possible to avoid needing to type \lyricmode when calling \test?

No.  Music functions don't get to choose the syntactic mode of their
arguments.  It would be rather tricky to figure out when to switch back
and forth without causing tokens to be lexed in the wrong mode due to
lookahead.


I was initially worried that the presence of the word "lyric" would be a potential source of confusion for a user--who is not entering lyrics, after all.  But if we're going to use lyricmode, the command is a useful reminder.  And, really, the improvement over the arcane entry of my last posted version is huge, so who cares about those extra characters.

I'm attaching a rewrite of the code which allows an easy mix of markups/strings and interprets hyphens as connectors.  Now there's no need for a TextSpanner.connectors property.

Duration info is easily available, as are skips.  I'm unsure at the moment how to use this info, though: whether there is more to be gleaned than simply using durations as a guide to relative spacing, whether using this info to position texts relative to notes is possible--or desirable.

This version also gives equal space between texts, promised earlier but not delivered.  (This justification looks immensely better when long texts are mixed with short.)

DN

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Attachment: text-spanner-inner-text-lyric-mode.ly
Description: Text Data


reply via email to

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