Skip to content

Feat/note staff schema#322

Open
byrongamatos wants to merge 5 commits into
mainfrom
feat/note-staff-schema
Open

Feat/note staff schema#322
byrongamatos wants to merge 5 commits into
mainfrom
feat/note-staff-schema

Conversation

@byrongamatos

Copy link
Copy Markdown
Contributor

🗂️ Migrated PR. Originally opened by @mogul on 2026-06-18 (was #515). Review history not preserved.

Reconstructed from slopsmith/slopsmith#703 — original PR by @zagatozee. Commits replayed with original authorship onto the current main.

Edit schema handling for Piano charts.

Groundwork for importing various chart styles while keeping authored Left Hand and Right Hand information intact. Useful for higher quality piano charts, difficulty options; being able to more accurately turn on or off LH or RH charts at whim while making it so authored information is retained, rather than replacing it with assumed data based on note location.

If "hands cross over" is properly charted (music.xml, Guitar Pro etc) then this should allow that to be accurately depicted in slopsmith piano charts.

Seperate PR on the "https://github.com/slopsmith/slopsmith-plugin-piano/tree/feat/note-staff-schema" branch will follow in due course (ahem, session limited)

Summary by CodeRabbit

  • New Features

    • Notes now carry explicit staff-position metadata; serialization and XML/wire formats include this attribute when present.
  • Changes

    • Track/drum detection tightened to rely on GPX/General MIDI channel info; older fallback heuristics removed.
    • Drum and bass classification logic updated.
    • Piano/keyboard voice handling refined so voice positions determine staff assignment and LH notes are marked as bass during merging.

Groundwork for piano charts keeping LH and RH designations intact, but seperated, so they can be toggled via menu options etc in future

(cherry picked from commit 606b69a75eb5202c6fb2978f496bf97db0ec65e4)
Par tof the LH/RH seperation future schema

(cherry picked from commit 56ad235a1ad4875527abb69836bcace79fdadfdc)
Add LH/RH piano chart seperation ground work

(cherry picked from commit 4c227f30347d7f0cf2f3a8c4f81f9ba7ec2dee68)
Updated the docstring for _load_gpif to clarify supported file formats and improved error messages for unrecognized containers.L

(cherry picked from commit 1866c72e53339a10d6f184d21c2261e9f0b21395)
(cherry picked from commit 64656bda1edc3fe03b6ad5e747c7afa3abca31d6)
@ChrisBeWithYou

Copy link
Copy Markdown
Contributor

Integration note — from a full-queue dry-run that merged every open org PR into a next-version test build.

song.py and gp2rs.py combine cleanly — the stf/staff field sits alongside main's bend-shape + teaching-mark fields (both additive). The one that needs care is gp2rs_gpx.py: main refactored the GPX left/right-hand piano merge (and GP8 multi-stave folding) into shared helpers _collect_column_notes / _merge_lh_notes, whereas this PR still carries the older inline LH-walk that tags LH notes staff=0.

Fix on rebase: keep main's helper structure and thread the staff value through it — add a staff param to _collect_column_notes and pass staff=0 at the fold sites — rather than reintroducing the inline walk. The main-path RH staff=1/0 assignment auto-merges fine. (Verified: 432 gp2rs/song/notation tests pass with that resolution.)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants