Skip to main content
Glama

MIDI File MCP

by xiaolaa2

🎵 MIDI 文件 MCP

执照


📖 简介

这是一款基于 Tone.js 和 @tonejs/midi 库的 MIDI 文件解析和操作工具,通过 MCP(模型上下文协议)服务提供功能。此工具可让您轻松读取、分析和修改 MIDI 文件,而无需深入研究 MIDI 文件格式的复杂性。

✨ 特点

  • 读取 MIDI 文件信息
  • 获取并修改音轨、音符、控制变化和弯音信息
  • 设置 MIDI 文件速度 (BPM)
  • 向特定音轨添加新音符、控制变化和弯音
  • 添加新曲目
  • 全面的错误处理

📥 先决条件

  1. 安装Node.js :确保 npx 命令可以正常运行,建议从Node.js 官网安装最新稳定版本

🔧 使用方法

与 MCP 客户端一起使用,支持的客户端包括但不限于:

游标配置示例

在 Cursor 中配置 midi-file-mcp:

"midi-file-mcp": { "command": "npx", "args": [ "-y", "midi-file-mcp" ] }

🎹 使用 MIDI 解析器 MCP 和绝对路径

MIDI Parser MCP 中的所有操作都需要 MIDI 文件的绝对路径。这确保了无论当前工作目录如何,该工具都能正确定位和操作您的 MIDI 文件。

示例提示

以下是一些您可以与 AI 助手一起使用的示例提示:

  1. 获取 MIDI 文件信息
    Can you show me information about the MIDI file at D:\path\to\your\file.mid?
  2. 分析曲目
    Please analyze all tracks in D:\path\to\your\file.mid and tell me how many notes are in each track.
  3. 设置节奏
    Change the tempo of D:\path\to\your\file.mid to 120 BPM.
  4. 使用注释
    Show me all notes in track 1 of D:\path\to\your\file.mid.
  5. 添加注释
    Add a C4 note at position 0 with a duration of 1 beat to track 0 in D:\path\to\your\file.mid.
可用操作
手术描述参数
获取midi信息获取常规 MIDI 文件信息文件路径
设置节奏设置 MIDI 文件的节奏 (BPM)文件路径,bpm
获取轨迹信息获取有关所有曲目的信息文件路径
通过索引获取轨迹信息获取有关特定曲目的信息文件路径、轨道索引
通过索引获取笔记获取特定曲目的所有音符文件路径、轨道索引
通过索引获取弯音获取特定音轨的所有弯音文件路径、轨道索引
通过索引获取控制更改获取特定轨道的所有控制变化文件路径、轨道索引
按索引添加注释向特定轨道添加注释文件路径、曲目索引、注释
通过索引添加控制更改将控制更改添加到特定轨道文件路径、轨道索引、控制变化
按索引添加弯音为特定音轨添加弯音文件路径、音轨索引、弯音
添加轨道向 MIDI 文件添加新音轨文件路径

注意:使用 Windows 路径时,请始终在文件路径中使用双反斜杠 ( \\ ) 或正斜杠 ( / ),以避免出现错误。

📄 许可证

本项目遵循 MIT 许可证。详情请参阅 LICENSE 文件。

🙏 致谢

感谢以下项目和库,如果没有它们,这个工具就不可能实现:

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

一个强大的 MCP 工具,用于解析和操作 MIDI 文件,允许用户通过自然语言命令读取、分析和修改 MIDI 文件,支持读取文件信息、修改音轨、添加音符和设置节奏等操作。

  1. 📖 简介
    1. ✨ 特点
      1. 📥 先决条件
        1. 🔧 使用方法
          1. 游标配置示例
          2. 🎹 使用 MIDI 解析器 MCP 和绝对路径
        2. 📄 许可证
          1. 🙏 致谢

            Related MCP Servers

            • -
              security
              F
              license
              -
              quality
              This TypeScript-based MCP server allows users to manage a simple notes system through creating and summarizing text notes using Model Context Protocol (MCP).
              Last updated -
              409
              6
              TypeScript
              • Apple
            • A
              security
              A
              license
              A
              quality
              This TypeScript-based MCP server allows users to manage and interact with a note system through Model Context Protocol, enabling note creation and summarization with URIs and metadata.
              Last updated -
              1
              JavaScript
              MIT License
              • Apple
            • A
              security
              A
              license
              A
              quality
              MCP server for Synthesizer V AI Vocal Studio, which allows LLMs to create/edit vocal tracks e.g. adding lyrics to the melody.
              Last updated -
              6
              Apache 2.0
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/xiaolaa2/midi-file-mcp'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server