Dan Eble <dan@lyric.works> writes: > On 2024-10-04 19:30, David Kastrup wrote: >> I'd probably bring them into existence with something like >> (define-compatibility-property 'baseMoment 'beatBase >> ly:moment? ly:moment-main ly:make-moment) > > My battle with conversion doesn't end with the legacy property. > > \set Timing.beatBase = 1/4 > > comes through the parser as the pair `(1 . 4)` rather than the > rational number `1/4`. > > I don't want to store this property as a pair and require all readers > to convert it to a number. > > I don't want to apologize for requiring `#1/4` instead, though we seem > to be in that situation already with > > * completionFactor > * \accidental > * \harmonicByRatio > * \magnifyStaff > * \text-accidental > > Is that good enough? Are there other options?
Functions can take scale? which is then converted with scale->factor and accepts various things. We don't have autoconversions for property sets/overrides and it would be a pretty big can of worms. You could do something like \set Timing.beatBase = \fraction 1/4 (with a suitable definition of \fraction) but frankly, I'd just use #1/4 here. We use that pretty regularly with numbers. -- David Kastrup