mridangam-playing-analysis
Analyzes timing and tempo accuracy of percussion practice recordings via onset detection, reporting per-gap deviations and consistency stats to MCP clients.
README
mridangam-playing-analysis
An MCP server (and standalone CLI) for analyzing the timing/tempo accuracy of a percussion practice recording — built around mridangam and konnakol practice, but the underlying method (onset detection + tempo-gap analysis) works for any single-line percussive recording.
It answers "which beats weren't at tempo," not "which stroke was played." No classifier, no training data, no machine learning — just signal processing (onset detection) and arithmetic.
What it does
- Detects when strokes were actually played in a recording (onset
detection via
librosa). - For each pair of consecutive strokes, computes the actual instantaneous tempo (60 / gap-in-seconds) and compares it to your target tempo.
- Auto-detects subdivision (e.g. two strokes per beat, as in konnakol-style subdivided playing) directly from the gap pattern — no manual configuration needed, and it adapts if the subdivision changes partway through a recording.
- Reports which specific gaps were out of tempo, by how much, and overall consistency stats — as text, and optionally a chart.
Why no fixed grid?
An earlier version of this anchored a fixed beat grid to the first detected onset and measured drift from it. That compounds error over a long recording and stops being locally meaningful — being consistently 10ms fast for five minutes looks like a large "deviation" by the end, even though the actual playing was solid throughout. This tool instead compares each gap only to its immediate neighbors, so feedback stays locally accurate regardless of recording length.
Two ways to use it
As a standalone CLI (no AI/LLM involved)
python timing_analysis.py path/to/recording.wav --bpm 80
python timing_analysis.py path/to/recording.wav # auto-estimates tempo
Prints a per-gap report and saves a chart PNG.
As an MCP server (for use with Claude Desktop, Claude Code, or any
MCP-compatible client)
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Then register it with your MCP client — see the config snippet and setup
instructions in the header comment of mcp_server.py.
Once registered, just ask your LLM client something like "analyze the
timing of my practice recording at /path/to/recording.wav, target tempo
80bpm" — it calls the analyze_timing tool, which returns the stats (and
optionally a chart image) for the model to discuss with you.
Privacy / security design
- The MCP tool takes a filepath, not audio data. It reads the file locally and only ever returns computed statistics (and, optionally, a separately-rendered chart image) — never the raw audio bytes, waveform, or anything derived directly from the sample array.
- The server never touches
stdin/stdoutwith its own output — those are reserved for the MCP protocol channel. Instead, it logs the exact payload it's about to return tostderrbefore sending it, so what's being shared with the LLM is inspectable. - Nothing is uploaded, stored, or sent anywhere beyond your own chosen LLM client and provider.
Files
timing_analysis.py— the core analysis engine (onset detection, tempo comparison, subdivision detection, reporting, charting). Usable standalone or imported by other tools.mcp_server.py— a thin MCP wrapper aroundtiming_analysis.py, adding no new analysis logic of its own.requirements.txt— Python dependencies.
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。