DJCCCCCCCC/midi_operater

Project Overview项目介绍

This is a MIDI processing plugin for DeepSeek Harness. It adds MIDI recognition, editing and visualization capabilities, supports operations like transposition and quantization, and provides an interactive FL Studio-style piano roll. Use it when parsing, editing MIDI or viewing track structure. It does not retain details like pitch bend, and the piano roll needs reloading after restart.

这是DeepSeek Harness的MIDI处理插件,可为DSH添加MIDI文件识别、编辑与可视化能力,支持识别、移调、量化等操作,提供可交互FL Studio风格钢琴卷帘。需要解析修改MIDI或查看音轨结构时使用,不保留弯音等细节事件,钢琴卷帘重启后需重载。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 3 warnings3 项注意
  • No license declared - all rights reserved by default; ask the author before commercial use or redistribution未声明开源许可证 —— 默认「保留所有权利」,商用或再分发前先问作者
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:DJCCCCCCCC/midi_operater

把 DJCCCCCCCC/midi_operater 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-midi-plugin

为 DeepSeek Harness 添加 MIDI 文件的识别、编辑与可视化能力,基于 @tonejs/midi

功能

  • 识别:midi_summary(概览)、midi_read(完整音符)、midi_chords(和弦进行)
  • 编辑:midi_write(写回)、midi_transpose(移调,可只移单条声部)、midi_quantize(量化)、midi_tempo(改速度)
  • 可视化:midi_read 的调用卡片带 FL Studio 风格钢琴卷帘(缩放、拖拽平移、轨道筛选)

组成

插件分两部分:

部分 文件 生命周期 作用
持久化 bundle(必装) index.js + midi.js + cordis.patch.yml 随 profile 持久,重启不丢 7 个 MIDI 工具
动态伴侣(可选) plugin.host.js + plugin.client.js + worker.mjs 会话级,重启后需重载 钢琴卷帘(在对话卡片里渲染)

工具是核心能力,靠 bundle 持久化。钢琴卷帘是可选的浏览器可视化,走动态插件(harness 对第三方只开放这一条 UI 通道);它用 host.call('midi-preview') 直接读完整文件,不受工具结果 24KB 截断限制,所以大文件也能画。

安装

一键安装

git clone https://github.com/DJCCCCCCCC/midi_operater
cd midi_operater
npm run install:plugin

脚本会自动完成:装依赖 → 打包 → 装进 profile → 验证。重启 web 服务后 7 个工具生效。

装到其他 profile:npm run install:plugin -- tui(把 tui 换成你的 profile 名)。

手动安装

# 本地目录
dsh plugin --profile web add ./midi-plugin

# 或从 GitHub
dsh plugin --profile web add github:DJCCCCCCCC/midi_operater

验证是否装好:

dsh --profile web --dump-config   # 应看到 "# == dsh-midi-plugin" 层

可选:钢琴卷帘

钢琴卷帘是浏览器可视化,属于动态插件,无法随上面的命令自动安装(harness 的安全机制要求授权)。想要的话,对 AI 说一句:

加载 midi 伴侣

AI 会完成注册,你点一次「允许」并刷新页面即可。之后 midi_read 的调用卡片里就会带出钢琴卷帘。

动态插件是会话级的,重启 web 服务后需要再说一次「加载 midi 伴侣」。工具(7 个 MIDI 工具)不受影响,永远在。

使用

把 .mid 文件放进工作区目录,让模型处理即可:

工具 参数 说明
midi_summary path 紧凑概览:速度/拍号/调号/轨道/音色/音符数
midi_read path, mode? 解析为 JSON;mode=full(默认)含每个音符
midi_write path, midi 把 JSON 写回 .mid
midi_transpose path, semitones, trackIndex?, outputPath? 移调;trackIndex 只移单条声部
midi_quantize path, subdivisions?, outputPath? 音符起始时间对齐节奏网格
midi_tempo path, bpm, outputPath? 设为单一速度
midi_chords path, epsilon? 和弦进行(自动排除鼓/打击乐/音效轨)

数据模型

midi_read 返回的 JSON 可直接传给 midi_write 回写(派生字段会被忽略):

{
  "name": "demo",
  "tempos": [{ "bpm": 120, "ticks": 0 }],
  "timeSignatures": [{ "timeSignature": [4, 4], "ticks": 0 }],
  "keySignatures": [{ "key": "C", "scale": "major", "ticks": 0 }],
  "tracks": [
    {
      "name": "Piano",
      "instrument": { "name": "acoustic grand piano", "number": 0 },
      "channel": 0,
      "notes": [
        { "midi": 60, "name": "C5", "time": 0, "duration": 0.5, "velocity": 0.8 }
      ]
    }
  ]
}

音名标注采用 FL Studio 的八度约定(middle C = C5 = MIDI 60)。

限制

  • 只保留音符级信息(音符/速度/拍号/调号/音色/通道),不保留弯音、表情控制器等细节事件。
  • midi_read 的 full 模式会一次性返回所有音符,超大文件先 summary 看规模。
  • 钢琴卷帘依赖动态伴侣,重启后需按上文重载(这是 harness 对第三方 UI 的限制)。
  • 钢琴卷帘带「下载」按钮(按当前轨道筛选导出单轨或整文件);上传按钮未提供,把 .mid 文件放进工作区直接 midi_read 即可。
← 上一个 Prev holdRein 下一个 Next DeepSeekHarness-Launcher →