lilypond-devel
[Top][All Lists]
Advanced

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

Re: TimeSignature with note in denominator


From: Aaron Hill
Subject: Re: TimeSignature with note in denominator
Date: Sat, 13 Nov 2021 07:12:07 -0800
User-agent: Roundcube Webmail/1.4.9

On 2021-11-13 6:14 am, Kieren MacMillan wrote:
Functions can accept ly:music? and you can drill down to determine if
it contains TimeSignatureMusic and modify its properties.  The only
issue is that currently \time (and TimeSignatureMusic) require the
denominator to be a number.  You can convert 2/4. to its logical
equivalent of 6/8 but key information is lost.  \note-denom cannot
magically recover the original intention to be able to render the
signature as the user wanted.

If 2/4. is the value entered, do we have access to the num (2) after
the conversion to 6/8 has happened? If so, I could “reverse engineer”
the 2/4. from (num . denom) = (6 . 8).

Only if the music function that accepts the input is able to store that information somewhere that can be referenced at the time the TimeSignature grob gets *stencilized*. (Is that a word?)

I took a quick look at the source, so let me try to summarize the flow of information as I see it:

1. User provides a \time command as input.
   There are two arguments for this command, beat-structure and
   fraction.  beat-structure is optional, defaulting to a null list,
   but otherwise it expects a number-list.  fraction is, well, a
   fraction (index-pair) that must be specified.  The \time command
   then constructs TimeSignatureMusic with the specified numerator,
   denominator, and beat-structure as music properties.

2. make-time-signature-set is the callback for TimeSignatureMusic.
   This callback processes the information from TimeSignatureMusic and
   sets various timing-related context properties.  Additionally, a
   time-signature-event is broadcast, although nothing currently
   listens for this event.  For reference, here are all the context
   properties that are written to:
   - timeSignatureFraction
   - baseMoment
   - beatStructure
   - beamExceptions
   - measureLength

3. Time_signature_engraver watches for changes to timeSignatureFraction.
   When appropriate, TimeSignature grobs are created using only the
   information within timeSignatureFraction.  The fraction is stored
   within the appropriately-named "fraction" grob property.

4. ly:time-signature::print is run.
   Properties of fraction and style are consulted here and a suitable
   time-signature-style-markup-procedure is invoked.

While not insurmountable, there are hoops to jump through to preserve the original rhythmic denominator for the stencil procedure to do useful work.


-- Aaron Hill



reply via email to

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