DeepSeek Harness plugin

midi_operater

Persistent DeepSeek Harness bundle: MIDI recognize/edit tools (midi_summary, midi_read, midi_write, midi_transpose, midi_quantize, midi_tempo, midi_chords) over @tonejs/midi.

Jump to install

Source facts

Repository
DJCCCCCCCC/midi_operater
Latest update
Aug 18, 2026
Category
Tools & Capabilities
GitHub stars
2
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/DJCCCCCCCC/midi_operater
Plugin: midi_operater
Author: DJCCCCCCCC

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer2 files
README.mdSource · read only

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_summarypath紧凑概览:速度/拍号/调号/轨道/音色/音符数
midi_readpath, mode?解析为 JSON;mode=full(默认)含每个音符
midi_writepath, midi把 JSON 写回 .mid
midi_transposepath, semitones, trackIndex?, outputPath?移调;trackIndex 只移单条声部
midi_quantizepath, subdivisions?, outputPath?音符起始时间对齐节奏网格
midi_tempopath, bpm, outputPath?设为单一速度
midi_chordspath, 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_readfull 模式会一次性返回所有音符,超大文件先 summary 看规模。
  • 钢琴卷帘依赖动态伴侣,重启后需按上文重载(这是 harness 对第三方 UI 的限制)。
  • 钢琴卷帘带「下载」按钮(按当前轨道筛选导出单轨或整文件);上传按钮未提供,把 .mid 文件放进工作区直接 midi_read 即可。