← 返回 Skills 市场
ctwww

Chord Analyzer

作者 ctwww · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
177
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install chord-analyzer
功能描述
Analyze music audio files to extract chord progressions, key signature, tempo, and song structure. Use when user wants to identify chords, analyze a song's h...
使用说明 (SKILL.md)

Chord Analyzer Skill

Analyze music audio files to extract chord progressions, key signature, tempo, and song structure.

When to Use

USE this skill when:

  • User wants to analyze a song's chords and harmony
  • "What are the chords in this song?"
  • "Analyze this audio file"
  • "Extract the chord progression"
  • "What key is this song in?"
  • User provides an audio file path and asks for musical analysis

When NOT to Use

DON'T use this skill when:

  • Only wants general music info (lyrics, artist) → use web search
  • Wants to generate music → use music generation skills
  • Needs professional-grade transcription → recommend specialized software (Chordify, Hookpad)
  • Requires detailed instrument separation → use dedicated source separation tools

Supported Formats

  • Audio: mp3, wav, m4a, flac, ogg
  • Duration: Works best for songs under 5 minutes

Installation

First time use requires installing dependencies:

pip3 install librosa numpy scipy scikit-learn soundfile

Usage

Basic Analysis

# Analyze an audio file
python3 chord_analyzer.py

# Edit the script to change the audio path
# Default: /Users/chentiewen/Music/网易云音乐/example.mp3

Script Integration

Copy the chord_analyzer.py script to your workspace and modify the audio_path variable:

audio_path = "/path/to/your/song.mp3"
result = analyze_audio(audio_path)

Output

The analyzer provides:

  1. Key Signature: Detected musical key (e.g., C, F#m, G)
  2. Tempo: Speed in BPM with rhythm classification
  3. Chord Progression: Complete chord sequence with timestamps
  4. Chord Statistics: Most frequently used chords
  5. Song Structure: Intro/Verse/Outro segmentation (basic)

Sample Output

调性: F#m
速度: 123.0 BPM
节奏: 快板 (Allegro)

和弦走向:
F#mdim → A → D → Bm → E → A → D → Bm → E ...

主要和弦:
  A: 15次 (20.3%)
  E: 14次 (18.9%)
  D: 12次 (16.2%)

How It Works

  1. Load Audio: Uses librosa.load() to read audio at 22.05kHz
  2. Extract Chroma: Computes chroma features (pitch class profiles) using STFT
  3. Detect Key: Analyzes chroma energy across all 12 keys (major + minor)
  4. Track Tempo: Uses librosa.beat.beat_track() for tempo detection
  5. Analyze Chords: Samples chroma at measure boundaries and matches against chord templates
  6. Merge & Simplify: Combines consecutive identical chords

Limitations

  • Accuracy: Chord detection is approximated; not professional-grade
  • Complexity: Struggles with heavily layered or distorted music
  • Structure: Simple segmentation (not verse/chorus detection)
  • Melody: Does not extract melodic lines or instrument parts
  • Chord Extensions: Detects basic triads (major, minor, diminished), not 7th/9th chords

For Complete Transcription

For professional music transcription, recommend:

Notes

  • Analysis takes ~10-30 seconds depending on song length
  • Best results with clear, non-distorted audio
  • Works best for pop/rock/folk styles with clear harmony
  • Not suitable for atonal, experimental, or heavily percussive music
安全使用建议
This skill appears to do exactly what it says: offline analysis of audio files using librosa. Before installing/running: 1) Run pip installs inside a virtualenv to avoid changing your system Python. 2) Edit the script to point audio_path to the file you want to analyze (the included default points at a sample user path). 3) Verify you are comfortable installing the listed Python packages and that you trust them (pip packages are common but check your environment). 4) The skill does not contact external servers or request secrets, but be mindful that any local audio you analyze may contain private content — only process files you are allowed to. 5) If you need higher-accuracy transcription or advanced separation, follow the SKILL.md recommendations to use specialized services.
功能分析
Type: OpenClaw Skill Name: chord-analyzer Version: 1.0.0 The chord-analyzer skill is a legitimate audio processing tool that uses the standard librosa library to extract musical features such as key, tempo, and chord progressions. The Python script (chord_analyzer.py) contains standard digital signal processing logic and lacks any indicators of malicious activity, such as network exfiltration, unauthorized file access, or command execution. While it includes a hardcoded local file path in the main block, this appears to be a leftover from development rather than a security risk.
能力评估
Purpose & Capability
The name/description claim music/audio analysis; the code uses librosa and numpy to load audio, extract chroma, detect key/tempo/chords and produce structure — all directly aligned. Required binary (python3) and Python packages are appropriate for this purpose.
Instruction Scope
SKILL.md only instructs installing audio-analysis packages and running the provided script, which is expected. One minor note: the script contains a hardcoded example audio_path (/Users/chentiewen/...), so running it without editing could attempt to read a local file path from a previous user's environment — harmless but may be unexpected. The SKILL.md's install list (scipy, scikit-learn, soundfile) is broader than the imports in the file but is reasonable because librosa often depends on these packages.
Install Mechanism
There is no automated install spec in the registry; installation is manual via pip as described in SKILL.md. Using pip to install librosa/numpy/etc. is an expected, standard approach for Python audio processing and does not pull code from untrusted custom URLs.
Credentials
The skill declares no required environment variables, credentials, or config paths. The script only reads a user-specified local audio file and does not access network endpoints or secret-storage — proportional to its function.
Persistence & Privilege
Skill is not always-included and does not request elevated platform privileges. It does not modify other skills or agent-wide config. Autonomous invocation is allowed by default but is not combined with other concerning access.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install chord-analyzer
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /chord-analyzer 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Extract chord progressions, key signature, and tempo from music audio files using librosa
元数据
Slug chord-analyzer
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Chord Analyzer 是什么?

Analyze music audio files to extract chord progressions, key signature, tempo, and song structure. Use when user wants to identify chords, analyze a song's h... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 177 次。

如何安装 Chord Analyzer?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install chord-analyzer」即可一键安装,无需额外配置。

Chord Analyzer 是免费的吗?

是的,Chord Analyzer 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Chord Analyzer 支持哪些平台?

Chord Analyzer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Chord Analyzer?

由 ctwww(@ctwww)开发并维护,当前版本 v1.0.0。

💬 留言讨论