Metadata-Version: 2.3
Name: harmonyscope
Version: 0.1.2
Summary: A real-time and offline chord recognition tool for audio analysis.
License: MIT
Keywords: harmony,chord recognition,audio analysis,real-time,music
Author: as6325400
Author-email: as6325400@gmail.com
Requires-Python: >=3.10,<3.12
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: librosa (>=0.11.0,<0.12.0)
Requires-Dist: matplotlib (>=3.10.1,<4.0.0)
Requires-Dist: questionary (>=2.1.0,<3.0.0)
Requires-Dist: rich (>=14.0.0,<15.0.0)
Requires-Dist: sounddevice (>=0.5.1,<0.6.0)
Project-URL: Documentation, https://github.com/as6325400/HarmonyScope
Project-URL: Homepage, https://github.com/as6325400/HarmonyScope
Project-URL: Repository, https://github.com/as6325400/HarmonyScope
Description-Content-Type: text/markdown

[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/as6325400/HarmonyScope)
# HarmonyScope

> Real-time chord detection and analysis for musicians 🎶

## 🚀 Installation


### System Dependencies

To ensure the package works properly, especially for microphone-related features, you need to have the `PortAudio` library installed on your system.

| Platform         | Command                                                         |
|------------------|-----------------------------------------------------------------|
| macOS            | `brew install portaudio`                                        |
| Ubuntu/Debian    | `sudo apt install libportaudio2`                                |
| Windows          | Usually works out of the box. If issues occur, refer to [sounddevice documentation](https://python-sounddevice.readthedocs.io/). |

Make sure to install the system dependency **before** running `pip install harmonyscope`.

### Install via pip

```bash
pip install harmonyscope
```


## Demo: Live Chord Detection

After installation, simply run:
```bash
mic_analyze
```
It will open an interactive selector to choose your microphone device, and start live chord detection in your terminal.

Demo preview:

![Demo GIF](plots/realtime_demo.gif)

## Example 1: C Major Chord Analysis

### Waveform
![Waveform](plots/C_waveform.png)

### Spectrogram
![Spectrogram](plots/C_spectrogram.png)

### Chroma
![Chroma](plots/C_chroma.png)


## Example 2: Piano C Major Chord Analysis

### Waveform
![Waveform](plots/piano_c-major_waveform.png)

### Spectrogram
![Spectrogram](plots/piano_c-major_spectrogram.png)

### Chroma
![Chroma](plots/piano_c-major_chroma.png)

