← Back to Skills Marketplace
ctwww

Chord Analyzer

by ctwww · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
177
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install chord-analyzer
Description
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...
README (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
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chord-analyzer
  3. After installation, invoke the skill by name or use /chord-analyzer
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Extract chord progressions, key signature, and tempo from music audio files using librosa
Metadata
Slug chord-analyzer
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 177 downloads so far.

How do I install Chord Analyzer?

Run "/install chord-analyzer" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Chord Analyzer free?

Yes, Chord Analyzer is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Chord Analyzer support?

Chord Analyzer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Chord Analyzer?

It is built and maintained by ctwww (@ctwww); the current version is v1.0.0.

💬 Comments