lilypond-user
[Top][All Lists]
Advanced

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

Re: Pitch value of previous note


From: David Kastrup
Subject: Re: Pitch value of previous note
Date: Fri, 30 Apr 2021 12:15:11 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

David Sumbler <david@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

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