David Sumbler <da...@aeolia.co.uk> writes:

> In a \relative{ } passage, in order for Lilypond to work out the
> absolute pitch of a note, it must have a record of the absolute pitch
> of the previous note, even if there have been some intervening rests.
>  It seems probable that it has this information in all cases, whether
> relative pitch notation is being used or not.

No.  \relative is a purely transformative function that takes music as
input and produces music (with a wrapping container of type
RelativeOctaveMusic that prevents further applications of \relative from
having an effect).

This happens immediately as a transform when \relative is being
executed.

> How can I access the pitch value of this most recent note for use in a
> Scheme function after some rests?

Other value-propating mechanisms exist for default durations (attached
by the parser upon reading expressions), pitch-less durations (added
during the scorifying stage when a music expression is accepted into a
\score block), chord repeats (also at scorification).

"For use in a Scheme function" is too hand-waving to have an idea which
phase of LilyPond's interpretation you would want to be interfering
with, so it would probably make more sense to present the problem you
are trying to solve rather than guess about the tools you think LilyPond
must be using internally.

-- 
David Kastrup

Reply via email to