On 2024-12-11 14:04, Trevor Bača wrote:
>
Thinking this way, proportionalNotationDuration is named correctly, because
what's being set here is a unit of time.
>

I am not sure that I made my reason for wanting to rename this clear. Maybe this will help:

```
\version "2.24.0"

{
  \set Score.voltaSpannerDuration = #(ly:make-moment 1/4)
  \applyContext
  #(lambda (ctx)
    (let ((duration (ly:context-property ctx 'voltaSpannerDuration #f)))
     (if (ly:duration? duration)
      (display (format #f "\nvoltaSpannerDuration is ~a\n" duration))
(display "\nhuh... I guess voltaSpannerDuration isn't a duration\n"))))

  s1
}
```

The "huh..." message appears in the output.

Regardless of the names of Lily's underlying (and therefore
user-invisible?) types, these user-facing context properties all measure
time, and not space. I think there might be a real gain in clarity in the
public-facing API if we move to labeling time-based properties with
"duration" and reserve "length" for properties that measure things in
centimeters, inches, staff spaces and the like.

    { c4 }
    \set Score.voltaSpannerDuration = #1/4

Both of these numbers refer to the musical length of a quarter note. (The "4" on the note also has other attributes.) Are both of them durations, or is one the duration and the other the reciprocal of the duration? How would you explain the difference to the kind of user you have in mind (who does not care about internal types)?

The Notation Reference has explained this special definition of "duration" is for quite some time:

    Durations

    The durations of notes are entered using numbers and dots.
    The number entered is based on the reciprocal value of the
    length of the note.

In my view, if jargon like this must be defined, it should be used carefully and consistently. That is why I support renaming the properties that have been using "duration" in a broader sense.

In theory, the issue could be resolved by switching to a different term for the number in "c4". The drawback is that "duration" is so firmly established that my head might explode.
--
Dan

Reply via email to