Skip to content

Preserve mid-score headers + optional HOMR backend (#1, #6) - #7

Draft
thedivergentai wants to merge 3 commits into
mainfrom
cursor/preserve-headers-homr-1795
Draft

thedivergentai wants to merge 3 commits into
mainfrom
cursor/preserve-headers-homr-1795

Conversation

@thedivergentai

@thedivergentai thedivergentai commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

Implements issue #1 (preserve mid-score key/time/tempo) and issue #6 (optional HOMR backend).

GUI (follow-up)

Two extra commits on this PR:

  1. Wire HOMR + header-lock into the Web UI — single and batch tabs now pass model_backend / header_lock_mode. Peak quality no longer overwrites an explicit homr selection.
  2. Visual restyle only — engraved-score desk theme (separate commit).

HOMR completeness

Live-tested against PyPI homr 0.7.0 (API differs from current GitHub main):

  • process_image returns None (writes beside the image) — wrapper prints the expected path
  • ProcessingConfig has no title_detection / no rocm_available — kwargs are filtered
  • Title OCR runs when the installed HOMR version supports it; --save-cache maps to HOMR cache

Imperfect example: Mutopia Bach WTC I Prelude 1, page 1, rotated ~2.4°, contrast drop, JPEG 38, speckle. Wrapper and HomrAdapter.recognize_page both produced valid MusicXML (18 measures, ~380–397 notes; HOMR merged to 1 part on this dirty scan — expected, not a join bug).

Credits

README Acknowledgements + UI footer credit liebharc/homr and scripts/homr_convert_wrapper.py.

Usage

pip install 'pdf2muse[homr]'
pdf2muse convert score.pdf --model-backend homr
# or Web UI: Model backend → homr
Open in Web Open in Cursor 

cursoragent and others added 3 commits September 3, 2026 17:18
Stop forcing a single key/time/tempo across joined scores by default
(issue #1 / MatNieuw jazz changes). Add segment-aware respelling and an
opt-in --header-lock mode for simple-score OMR cleanup.

Add an optional HOMR adapter (issue #6) via pdf2muse[homr], selectable with
--model-backend homr, without making AGPL HOMR a hard dependency.

Co-authored-by: Divergent AI <thedivergentai@users.noreply.github.com>
Expose the homr backend and key/time/tempo lock controls on single-score
and batch conversion. Peak quality no longer overwrites an explicit backend.

Harden the HOMR wrapper for PyPI 0.7.x (process_image returns None, no
rocm_available, no title_detection field) and enable title OCR plus cache
passthrough. Credit HOMR and homr_convert_wrapper.py in the README.

Co-authored-by: Divergent AI <thedivergentai@users.noreply.github.com>
Swap the orange Inter chrome for Fraunces + Source Sans 3, ink navy
surfaces, brass rules, and staff-line background. Visual-only; conversion
controls are unchanged.

Co-authored-by: Divergent AI <thedivergentai@users.noreply.github.com>
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.

2 participants