Skip to content

Fixed: Tuplet rework#195

Open
ahankinson wants to merge 16 commits into
mainfrom
fixed-123-tuplets
Open

Fixed: Tuplet rework#195
ahankinson wants to merge 16 commits into
mainfrom
fixed-123-tuplets

Conversation

@ahankinson
Copy link
Copy Markdown
Contributor

I may have gotten some things wrong, so please review closely.

As part of this I have also had the Verovio rendering code re-worked. Primarily this was done to support the 'annotated tuplet' example provided, but it is also more flexible and resilient to encoding errors.

Fixes #123

I may have gotten some things wrong, so please review closely.

As part of this I have also had the Verovio rendering code re-worked. Primarily this was done to support the 'annotated tuplet' example provided, but it
is also more flexible and resilient to encoding errors.

Fixes #123
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

PR Preview Action v1.6.3

🚀 View preview at
https://rism-digital.github.io/pae-code-spec/pr-preview/pr-195/

Built to branch gh-pages at 2026-05-28 08:48 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@ahankinson ahankinson added the Type: Spec Change Changes to the PAE Specification label May 13, 2026
Comment thread v2/index.html Outdated
Comment thread v2/index.html
Comment thread v2/index.html Outdated
@ahankinson
Copy link
Copy Markdown
Contributor Author

I have tried to resolve all the comments.

  • There is (at least to me) mental model of a tuplet that has "metadata" and "data". Tuplet metadata is set off from the data by the use of semicolons.
  • An optional "musical duration" segment can be added at the start of a tuplet. This effectively moves an encoding like 4(... to (4;...). It seemed better to place that at the start, since it meant we could keep the "label" side of the metadata (the end) from needing to use any punctuation to separate out the concerns.
  • Having the musical duration inside of the parentheses clears the way for implied durations and duration patterns, since 8884(... becomes 888(4;... and resolves the confusion that we had with the previous encoding method.
  • The label side of the tuplet is separated from the body also with a semicolon. (CCC;3). This can take a simple number or a ratio, e.g., (CCC;3:2). This is largely unchanged.
  • I used the term "musical duration" to distinguish it from the "written duration" of the notes. In a tuplet, an eighth note is not actually an eighth note, it's just written with that shape. I found terminology like "full" or "total" to be ambiguous. (A full measure? A full note?). I tried to expand this concept in a note.

I hope this keeps everyone happy (including me.)

@lpugin
Copy link
Copy Markdown
Contributor

lpugin commented May 16, 2026

This looks good, thanks!

One general comment for the use of "musical duration", which I find confusing. Since we are maintaining the value mostly for backward compatibility, I would suggest sticking with "total duration" used in v1, which I think was not really a problem. Another option could be "sounding duration", but I would not oppose "musical" with "written".

FWIW, MuseScore uses the term "entire duration [of the tuplet group]".

@ahankinson
Copy link
Copy Markdown
Contributor Author

“Full” or “total” isn’t really a definition though, it’s a description. Full in reference to what? The measure? The beat? What is it the total of?

“Musical” and “written” is trying to evoke the same ideas as “logical” and “visual” (since that’s basically what is happening here) without also needing to bring in all of that baggage. The “logical” duration is 4, but the “written” durations are three eighth notes.

@lpugin
Copy link
Copy Markdown
Contributor

lpugin commented May 16, 2026

For me

A duration MAY immediately follow the opening parenthesis (. This value encodes the total duration of the tuplet group.

is pretty much the wording we had in v1 and would be perfectly clear. Why would it be in reference to the measure? or to the beat?

"logical" would be better than "musical" IMO. Or "effective duration"? Or "actual duration"? I leave it to @BaMikusi and @jenniferward to decide.

@lpugin
Copy link
Copy Markdown
Contributor

lpugin commented May 16, 2026

Maybe

This value encodes the duration the tuplet group occupies.

?

@BaMikusi
Copy link
Copy Markdown
Collaborator

For me, too, the adjective "musical" seemed problematic at first sight, an that feeling of unease didn't go away after repeated readings, either. I guess partly because, if "musical" appears as the opposite of "written," my mind starts to wonder in the realm of performance details, like a rubato -- thus, in the comparison the "written" side will seem the solid and measurable one, and the "musical" the unstable and fluctuating factor. With that in mind, any of the alternatives suggested by Laurent would seem a better choice to me -- so it should arguably be the one that Andrew can best live with.

@ahankinson
Copy link
Copy Markdown
Contributor Author

I don’t have much time to work on this in the next few days, but I have specifically avoided “full” or “total” because there is ambiguity for what it is the “full”’or “total” of. Measure? Beat? If it’s an eighth note tuplet in 4/4, in what sense is that “full” or “total”?

Comment thread v2/index.html Outdated
Comment thread v2/index.html Outdated
Comment thread v2/index.html Outdated
@BaMikusi
Copy link
Copy Markdown
Collaborator

[...] there is ambiguity for what it is the “full”’or “total” of. Measure? Beat? If it’s an eighth note tuplet in 4/4, in what sense is that “full” or “total”?

I don't see either, why anyone would want to think of a meaasure here. It's the total value of the tuplet, i.e., of the stuff that's written in the parentheses after this duration reference.

@ahankinson
Copy link
Copy Markdown
Contributor Author

It's the total value of the tuplet, i.e., of the stuff that's written in the parentheses after this duration reference

it isn’t, though. If you add up the durations inside the tuplet you would get a different number than the number you provide at the beginning.

@BaMikusi
Copy link
Copy Markdown
Collaborator

Ah, so you would add it up so literally -- that indeed won't work. Then you might indeed want to have a refence point outside of the code itself and speak of the tuplet's, say, "sounding" duration.

@ahankinson
Copy link
Copy Markdown
Contributor Author

Exactly. “Full” or “total” implies some form of addition, but there is nothing to add together to make the first duration number.

@lpugin
Copy link
Copy Markdown
Contributor

lpugin commented May 18, 2026

It seems to me we all agree that this value is not needed since we agreed to make it optional. We keep it for backward compatibility for projects that have used it in the PAE encoding - which is not the case of (at least) most RISM incipits. I can say more why I think this is a limiting approach to tuplet encoding if needed.

If we want to remove "full" duration that we had in v1, then we can do so, but we need something else than "musical" because - as we can see from this discussion - that creates confusion.

I would suggest simply saying that "this value encodes the duration the tuplet group occupies.", which does not have "full" nor "total" but also avoid qualifying what this duration is - it seems to me we do not need to.

If that is not good, then when can use "logical duration", "effective duration", "sounding duration", "realised duration", or something along these lines, which I all find less good than just "occupied", but that would be OK for me.

@lpugin
Copy link
Copy Markdown
Contributor

lpugin commented May 18, 2026

PS Since we already have a definition for "Written pitch" vs "Sounding pitch", it seems that a good compromise might be "sounding duration". We could say "this value encodes the corresponding sounding duration of the tuplet group."

Any thoughts?

@ahankinson
Copy link
Copy Markdown
Contributor Author

That’s ok with me, but we should add the duration entries to the terminology sections, and link to them in the text.

@BaMikusi
Copy link
Copy Markdown
Collaborator

As is evident from my ealier comment

(...) Then you might indeed want to have a refence point outside of the code itself and speak of the tuplet's, say, "sounding" duration.

I am also happy with "sounding duration."

Amen.

@ahankinson ahankinson requested review from BaMikusi and lpugin May 28, 2026 05:49
Comment thread v2/index.html Outdated
Comment thread v2/index.html Outdated
ahankinson and others added 4 commits May 28, 2026 15:04
Co-authored-by: Laurent Pugin <lxpugin@gmail.com>
Co-authored-by: Laurent Pugin <lxpugin@gmail.com>
@ahankinson ahankinson requested a review from lpugin May 28, 2026 08:48
Comment thread v2/index.html
no actual effect on the note duration. If no duration value is given, then the last stated duration
value is used. If no duration value is stated in the <a>encoding</a>, a default duration value of
<code>4</code> is assumed.
The tuplet number MAY be provided. If provided, it MUST be either a positive integer,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first sentence should be removed, and the second one attached to the previous paragraph.

Comment thread v2/index.html
<code>(4;'4D8E)(4;'4D8E)</code>
</td>
<td class="notation-result"></td>
<td>Two triplet values of varying duration.</td>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is actually confusing because the two tuplets are the same. So if the varying duration is about the varying duration of the notes inside (which I think it is), we should have only one tuplet.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PS I was expecting something like (4;'4D8E)(2;'4D8E)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Spec Change Changes to the PAE Specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rework tuplet section

3 participants