
Sheet Music OMR
io.github.raulkivi由 GitHub 帳號 raulkivi 發布v0.2.2更新於 Oct 24, 2026
Converts photos or scans of printed sheet music to MusicXML with optical music recognition
概覽
本機 MCP 伺服器,以光學樂譜辨識將印刷樂譜的照片或掃描檔轉換為 MusicXML。
- 可以做什麼
- 辨識單張樂譜影像(檔案路徑或 base64),以內嵌文字或存檔路徑回傳 MusicXML
- 處理多頁影像並合併成一份 MusicXML 樂譜
- 可在兩種辨識引擎間選擇:預設的 oemer,或用於多聲部 SATB 合唱譜的 audiveris
- 查看伺服器中繼資料、支援的輸入輸出格式,以及執行環境相依元件的健康狀態
- 適用情境
- 當你手上有印刷樂譜的掃描檔或照片,想讓助理產出可編輯的 MusicXML,尤其是要接續後續樂譜處理流程,或需要數位化多頁譜、合唱譜時適用。
- 執行需求
- 以本機 Python 程序執行(需 Python 3.11 以上),透過 uvx 或 uv run 啟動;不需帳號或 API 金鑰。首次使用會下載模型檔(oemer 約 100 MB,audiveris 約 80 MB);audiveris 引擎另需 dpkg-deb 解開其內附的執行檔。可用 OMR_AUDIVERIS_HOME 指定 Audiveris 下載位置。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Sheet Music OMR,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
omr-mcp
MCP server that converts sheet music images to MusicXML using optical music recognition (OMR).
What it does
Takes a photo or scan of printed sheet music and returns a MusicXML document. Handles single pages or multi-page scores. Feeds directly into the rest of the sheet-music-mcp pipeline.
Two selectable OMR backends, via an optional engine argument on the recognition tools:
oemer(default) — fast, no extra download beyond the ~100 MB model checkpoints. Best for single/two-staff scores; flattens multi-staff (SATB) choir scores into one part (see "Known limitations" below).audiveris— correctly separates multi-staff SATB scores into simultaneous parts. Requires 300+ DPI source images and a larger (~80 MB) first-use download; runs as a subprocess.
Tools
Installation
On first run, oemer downloads ~100 MB of model checkpoints. This happens once and is cached.
Quick install: bash install.sh sets up everything in one command and prints a ready-to-paste
client config — see SETUP.md. Ready-made configs for Claude Desktop, Cursor, Windsurf,
Continue, and Zed are in examples/. Having trouble? Check
TROUBLESHOOTING.md.
Running
No environment variables required.
Claude Desktop configuration
Usage examples
Large results come back as {"musicxml_path": ..., "score_summary": {...}, "metadata": ...}, with
the file under <SHEET_MUSIC_OUTPUT_ROOT>/scores/ (default: the server's working directory). Pass
that path to the other servers' tools as musicxml_path instead of copying the score.
Testing
Test samples
SATB a cappella samples are available in test_samples/pdmx_satb_samples/:
Source: PDMX dataset — 250K+ public domain scores.
Dependencies
- oemer — default deep learning OMR engine (UNet + SVM, ONNX Runtime)
onnxruntime>=1.30— releases after 1.19 reject the negative ConvTranspose pads baked into oemer'sunet_bigcheckpoint;onnx_compat.pyrewrites them into the equivalentoutput_paddingbefore each recognition (needsonnx). This allows Python 3.11–3.14 (seedocs/HANDOVER.mdgotchas)opencv-python-headless==4.10.0.84— pinned; 5.x changedcv2.HoughLinesP()'s return shape, which crashes oemer's staffline extraction (seepyproject.tomlcomments /docs/HANDOVER.mdgotchas)- Pillow — image loading and validation
- defusedxml — safe XML parsing
- mcp — MCP protocol
- Audiveris — optional alternate OMR engine (
engine="audiveris"). Not a Python dependency: a self-contained binary (bundles its own JRE) downloaded automatically on first use of that engine. Requiresdpkg-deb(present on virtually all Debian/Ubuntu systems) to extract it — no root/system install.
Known limitations
- oemer's default output loses SATB voice structure. oemer reads multi-staff choir systems
sequentially rather than simultaneously, so a 4–5 voice SATB score comes out as a single merged
<part>with the clef alternating back and forth, instead of one part per voice — real data loss, not a benign modeling difference (confirmed by inspecting generated MusicXML), and architectural in oemer itself (its rhythm-alignment code hard-asserts at most 2 simultaneous staff tracks — see docs/HANDOVER.md). Useengine="audiveris"for multi-staff choir scores — it correctly separates voices into simultaneous parts, verified against real fixtures. Requires 300+ DPI source images.
Performance notes
- Processing time: ~90–100s per page on CPU for
oemeronce its model checkpoints are cached; ~7–15s per page foraudiverisin testing (despite JVM subprocess startup overhead) - Output may vary slightly between runs (both engines) — do not assert on exact XML equality
- The generated MusicXML is functionally correct but may not pass strict schema validation
System requirements
- Python 3.11+
- No system libraries required (ONNX Runtime is bundled via pip)
來源:omr-mcp/README.md,提交 5fcea5d
工具
0版本歷史
2- v0.2.2最新Oct 17, 2026
- v0.2.1Sep 26, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分