recognize_score
识谱(谱种识别与路由)
识别谱面图片的谱种(五线谱/六线谱/简谱/方块字谱等)并给出后续引擎路由。本工具不做音符级 OMR,只到谱种识别与路由,不产出 MusicXML。
image_pathrequiredoutput_dir
io.github.ZhongQuinnKingPublished by GitHub account ZhongQuinnKingv0.2.1Updated Oct 31, 2026
Local MCP server, eight music tools: OMR, transcription, theory and notation checks, convert.
Local music MCP server with eight tools for score recognition, audio-to-score transcription, theory and notation checks, conversion and rendering.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Follow the launch instructions in the repository.
乐正线·一级
原作者:ZhongQuinnKing(主号署名) 许可:MIT,见 LICENSE.md 商用与合作:请先联系 [email protected](标题注明【商用授权】或【改编授权】);也可走本仓库 issue
给主流 AI 用的音乐能力包。姊妹篇:采诗读互联网、拾级陪人、玉尺量文章、弦歌弄音乐。
能力验证:一个真实的钢琴编配项目全程走通(选曲/取源/转谱/出谱),产出全部归本包。 项目本身不是成果,这套可复用的流程与工具才是。
每一步都带来源与置信标注。 出库闸:核过的才许标"已验证",没核的一律标"待核对"(报"已验证"须附标准报告卡,口径见 docs/06)。
环境:Python 3.11(参考环境用 conda env music-transcribe)。依赖按工具分档,零依赖件装包即用:
一键安装:
五分钟上手:
(route/fix/export 同壳入口;装不上看 docs/12-故障排查)
自测(判据级二十一套,与 CI 同款):
外部引擎(SMT/Audiveris 等)非 pip 依赖,接入见 docs/03;统一入口 tools/engine_runner.py(引擎注册表与 run.json 留痕)。
常用一条命令:
python3 tools/notation_check.py 谱.musicxmlpython3 tools/score_doctor.py inspect 谱.musicxmlpython3 tools/工具_谱种路由.py 谱图.png,一张图先判谱种(五线谱/六线谱/简谱等),再走对应引擎与工序python3 tools/theory_check.py 谱.musicxml(声部交叉/平行五八度/跨度上限可调/密度骤降/时值)python3 tools/export_pack.py 谱.musicxml --out 目录 --title 曲名(五线谱三件+mxl/mid+简谱三件+试听+成品卡+zip)python3 tools/yuchi_score_check.py 谱.musicxml(谱面规范查对:小节对账/附点越界/连音线闭合/变音记号;只诊断不改谱,与记谱体检分工见规则档)知识线:直接按 知识/90-音乐问答协议.md 的三层路径执行,零安装。
源获取(复刻线):依赖外部通道(采诗,开源公开:github.com/ZhongQuinnKing/caishi;各站边界见 docs/02)。没有该通道时的降级路径:只处理本机已有文件,或用公开搜索自行找谱(弹琴吧/B站等直达页面),按 docs/02 的源分级与各站边界走;不静默降级、不虚构来源。
python3 tools/bench_run.py)。样例全部自造,验「流程可复现」,不承诺准确率数字已验证:
在办(边界如实):
Source: README.md at commit d3f3eed
识谱(谱种识别与路由)
识别谱面图片的谱种(五线谱/六线谱/简谱/方块字谱等)并给出后续引擎路由。本工具不做音符级 OMR,只到谱种识别与路由,不产出 MusicXML。
image_pathrequiredoutput_dir音符级 OMR(Audiveris)
用 Audiveris 5.11.0 对印刷体五线谱图片/PDF 做音符级识别,产出 MusicXML(.mxl 与解压后的 .musicxml),并用 music21 回读复验音符数。不可识别或非谱面输入会结构化拒绝。
pathrequiredengineoutput_dir音频/视频转谱
音频经 Basic Pitch(ONNX,本地 WSL)转 MIDI,再由 music21 量化生成 MusicXML;同时跑乐理与记谱校验。视频先用 PyAV 提取音轨(16 kHz 单声道 WAV)再走同一链路。
tempoquantizemedia_pathrequiredoutput_dir音轨提取(PyAV)
从视频或音频容器中解码音轨,按指定采样率与声道数写出 16-bit PCM WAV;无音轨的视频会以 no_audio_stream 结构化拒绝。
monopathrequiredoutput_dirsample_rate乐理校验
调用 music-pack 的 theory_check:声部交叉、平行五八度、跨度过大、声部密度骤降、小节时值等机械可判项。
output_dirscore_pathrequiredspan_limit记谱规范校验
调用 music-pack 的 notation_check:符杠分组、符干方向、休止符布局、谱表分配。只接受未压缩 MusicXML。
output_dirscore_pathrequired格式互转与移调
用 music21 在 MusicXML / MIDI / MXL 之间互转,并按半音数移调;输出回读复验音符数与移调增量。
semitonesoutput_dirscore_pathrequiredoutput_format渲染出图与 PDF
music21 生成 LilyPond 源,由 LilyPond 2.13.62 输出 PDF 与 PNG。旧版 LilyPond 对中文标题支持有限,会标注。
titleformatsoutput_dirscore_pathrequired90% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
任何输入(糊图/截图/哼唱/一句话/数字文件) → 认曲:低质输入只是"线索",不硬做(docs/01) → ├─ 【数字源直通线】用户持有数字文件(自打/正版/下载) │ → 验证三件套 → 直用(最快最准) └─ 【搜索线】没有数字源 → 采诗换源:全网搜高质量谱——弹琴吧/B站链/平台矩阵(docs/02) → 源择优:数字源 > 印刷高清 > 印刷普通;手写不用 → 转谱(引擎链+多引擎共识,docs/03) → 符号层:从原谱图读取回填(连音/力度/踏板/指法) → 精排(Dorico)→ 出谱bash install.sh core # 按档装:core / render / browser / vision / allbash install.sh all # 四档全装python3 tools/xiange.py doctor # 环境自检(缺什么直接给修复命令)python3 tools/xiange.py check 谱.musicxml # 记谱体检(零依赖,立即可跑)python3 tools/xiange.py selfcheck # 判据级自测全列(一遍看全)for f in tools/tests/test_*.py; do python3 "$f"; done