Repository navigation
Draw a theme's extract from its upbeat - #589
Merged
Merged
Conversation
A note's link from the first full bar of a score that opens on a pickup now draws the pickup too: "the theme, bars 1–4" of the Nocturne Op. 9 No. 2 starts on its B-flat, the Waltz Op. 69 No. 2 on its F-sharp. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Preview supprimée (PR fermée). L'URL n'est plus accessible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
An About note's bar link that starts at the first full bar of a score opening on a pickup now draws the pickup too. "The theme, bars 1–4" of the Nocturne Op. 9 No. 2 used to start on beat 1 of bar 1, without the B♭ upbeat the tune begins on; the Waltz Op. 69 No. 2's theme lost its F♯ the same way.
drawExcerpt(public/js/scoreExcerpt.js) starts at the pickup when the range begins at index 1 and OSMD marks bar 0 asImplicitMeasure. Done in the drawer rather than by rewriting links to#m0-…: every note gets it, and a theme of eight bars plus its upbeat stays within the eight-bar cap ofabout.test.js. Für Elise's explicit#m0-4draws the same as before.Mid-piece returns of a theme keep starting at their bar: their upbeat is the end of the bar before, which an extract cannot draw in part.
Testing
test/about_test.rbcase: the Nocturne's "m. 1–4" draws five bars. 5 runs out of 5 on its own, and the whole suite (282 runs, 0 failures);npx vitest rungreen.🤖 Generated with Claude Code