music-tonality
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/music-tonality — Tonality & Harmony Analysis
/music-tonality — 调性与和声分析
Detect musical key, mode, chord progression, and melody pitch contour.
检测音乐的调式、调性、和弦进行以及旋律音高轮廓。
Usage
使用方法
/music-tonality <audio_file_path>/music-tonality <音频文件路径>Steps
步骤
- Validate the audio file path
- Run tonality analysis:
bash
python3 -m music_analyzer tonality "<audio_file_path>"- Present results:
- Key: Detected key and mode (e.g. "C major", "A minor")
- Confidence: Key detection confidence
- Chord Progression: Sequence of chords with timestamps
- Melody Contour: Simplified pitch contour (sampled Hz values)
- 验证音频文件路径
- 运行调性分析:
bash
python3 -m music_analyzer tonality "<音频文件路径>"- 展示结果:
- 调式:检测到的调式与调性(例如“C大调”、“A小调”)
- 置信度:调式检测的置信度
- 和弦进行:带时间戳的和弦序列
- 旋律轮廓:简化的音高轮廓(采样的赫兹值)
Detection Methods
检测方法
- Essentia (standard/full tier): Uses essentia's KeyExtractor and ChordsDetection
- Librosa (lite tier): Krumhansl-Schmuckler key profiles + template-based chord matching
- Essentia(标准/完整版本):使用Essentia的KeyExtractor和ChordsDetection工具
- Librosa(轻量版本):Krumhansl-Schmuckler调式轮廓 + 基于模板的和弦匹配
Output Fields
输出字段
| Field | Description |
|---|---|
| Estimated key (e.g. "C major") |
| Confidence 0-1 |
| "major" or "minor" |
| Chord events with time, duration, label |
| Sampled pitch values in Hz |
| 字段 | 描述 |
|---|---|
| 预估的调式(例如“C大调”) |
| 置信度(0-1) |
| “major”(大调)或“minor”(小调) |
| 带时间、时长、标签的和弦事件 |
| 采样的音高值(单位:赫兹) |