Fix LilyPond melody/guide tones staff overlap and web UI null checks - #18
Merged
Merged
Conversation
…l checks - LilyPond layout overhaul: - Enclose melody and guide tones staves in \new GrandStaff with explicit StaffGrouper vertical spacing overrides. - Make page-count = #1 conditional on single-staff or low-density scores so multi-system lead sheets paginate naturally without vertical squishing. - Group simultaneous melody notes into chords instead of sequential notes. - Add decomposeDuration and durationToSixteenths to ensure exact measure durations and tie handling across staves. - Handle full-measure rests across any time signature (e.g. 5/4, 3/4). - Use lilypondSkip for exact bracket and text spanner alignment. - MusicXML import: - Sort and deduplicate harmony events across polyphonic voices to avoid inverted chord timing. - Web UI & API: - Ensure API returns non-null arrays for chords, devices, and journeySpans. - Guard ChordsTable and App components against undefined or null chords/timeSignature.
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.
Summary
This PR addresses two issues:
LilyPond Dual-Staff Formatting Overhaul:
\new GrandStaffwith explicitStaffGrouper.staff-staff-spacing(padding 3.5, basic distance 11) and system spacing overrides.page-count = #1compression when melody is enabled with multiple systems, allowing lead sheets to naturally paginate across pages without vertically colliding staves.<pitch1 pitch2 ...>dur) rather than emitting them sequentially, preventing measure overflow.decomposeDurationanddurationToSixteenthswith exact sixteenth-unit tracking to guarantee measures always match the time signature duration and properly tie complex values.lilypondSkip) for device spanners.Web UI & API Null-Safety:
chords,devices, andjourneySpansin JSON responses to prevent front-endnull.map()runtime exceptions on tunes with unharmonized measures.ChordsTable,ScoreViewer, andApp.web/dist.Testing
go test -v ./...passes all unit and integration tests.