Aaron Hill <lilyp...@hillvisions.com> writes: > 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?)
Time_signature_performer does not have access to a grob. > 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. Huh? $ git grep listen_time_signature lily/time-signature-engraver.cc: void listen_time_signature (Stream_event *); lily/time-signature-engraver.cc:Time_signature_engraver::listen_time_signature (Stream_event *ev) lily/time-signature-performer.cc: void listen_time_signature (Stream_event *); lily/time-signature-performer.cc:Time_signature_performer::listen_time_signature (Stream_event *ev) -- David Kastrup