lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 3457: Add snippet `Using \partcombine with lyrics'. (issue 113


From: markpolesky
Subject: Re: Issue 3457: Add snippet `Using \partcombine with lyrics'. (issue 11328043)
Date: Fri, 19 Jul 2013 19:35:13 +0000

On 2013/07/19 10:48:43, dak wrote:
> To be clear, there are two separate effects I'd like to
> achieve with this one interface:
>
> 1) aligning lyrics to one of the two partcombined voices
> 2) aligning lyrics to a third (hidden) voice, without
>    altering spacing

It's more like

3) aligning lyrics to non-existing note columns.

LilyPond does not align reasonably to non-existing note
columns anyway.  One could try fudging in pseudo_engravers
that create note-busy events, but you'll still have the
problem that you _either_ need to reserve space (defeating
the "without altering spacing" purpose) _or_ don't get
reasonable positioning.

Is there no way to extract the averages of the NoteColumn
X-positions between two voices?  So given these voices:

\relative c'' { c4. b8 c2 }
\relative e' { e4 f e2 }

... then the respective X-positions, measured in beats
(pardon the oversimplification), would be:

(0 1.5 2)
(0 1 2)

The remaining calculation is trivial:

(define avg
  (lambda (x . rest)
    (/ (apply + (cons x rest)) (1+ (length rest)))))

(map avg '(0 1.5 2) '(0 1 2)) ==> (0 1.25 2)

Is there a way to tell the Lyrics context to align notes to
the newly calculated X-positions?  I may be out of my
league, but this would be really helpful; all the
workarounds that I've come up with are really ugly.  Here's
a real-world example:

http://www.markpolesky.com/norobots/Day-Is-Done.png

This happens often enough to be a real pain.

Thanks
- Mark

https://codereview.appspot.com/11328043/



reply via email to

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