Analyze audio files, detect musical keys and BPM, organize your library by Camelot notation, and generate harmonic mixing playlists β all from a clean PyQt5 desktop GUI.
| Feature | Details |
|---|---|
| π΅ Key Detection | Chroma-based analysis via librosa; outputs musical key + Camelot code |
| π₯ BPM Detection | Onset-based tempo estimation |
| β‘ Energy Analysis | Brightness, density, energy curve classification |
| πΆ Groove Detection | Kick presence, swing, percussion density |
| π Mood Classification | Major/minor tonality, aggressiveness, tension, brightness |
| π Library Organizer | Batch-copies files into CH_Org[N]/[key]_Camelot/ hierarchy |
| π§ Playlist Generator | 4 strategies: harmonic, harmonic sequence, key-to-key, Camelot zone |
| 0β1 compatibility rating across harmonic, BPM, groove, mood, energy dimensions | |
| π Day / Night Theme | Full dark/light theme toggle |
| π Multi-language | English, Portuguese, Spanish |
| π Camelot Wheel | Built-in interactive Camelot wheel visualization |
| π Real-time Progress | Animated per-file progress dialog with live speed/ETA stats |
- Python 3.8 or higher
libsndfileandffmpeg(system packages β see platform notes below)
| Platform | Command |
|---|---|
| Ubuntu / Debian | sudo apt install libsndfile1 ffmpeg |
| Fedora / RHEL | sudo dnf install libsndfile ffmpeg |
| macOS | brew install libsndfile ffmpeg |
| Windows | Install FFmpeg and add to PATH |
# 1. Clone
git clone https://github.com/your-username/camel-hot.git
cd camel-hot
# 2. Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install Python dependencies
pip install -r requirements.txt
# 4. Verify the installation
python test_setup.pypython main.pyOr use the convenience script (activates venv, checks deps, launches GUI):
./run.shPoint at a single audio file and click Analyze. The app reports key, Camelot code, BPM, energy level, groove type, mood, and transition potential.
- Select an Input Folder (your music library).
- Select an Output Folder (where organized files will go).
- Click Organize β a naming dialog lets you choose the collection name (default:
CH_Org1, auto-incremented). - Files are copied into
[output]/[CH_OrgN]/[key]_Camelot/by default. Enable Move Files to remove originals.
Choose one of four strategies and click Generate Playlist. A .m3u file is written to the location you specify.
| Strategy | What it does |
|---|---|
| Harmonic | Filters tracks by key compatibility, optional BPM range |
| Harmonic Sequence | Follows the Camelot wheel clockwise/counter-clockwise |
| Key-to-Key | Finds the smoothest harmonic path between two keys |
| Camelot Zone | Groups tracks within N positions of a target key |
Load two audio files and click Compare. The transition score table shows harmonic, BPM, groove, mood, and energy sub-scores.
camel-hot/
βββ main.py # Entry point
βββ config.py # All constants and path helpers
βββ logging_config.py # Log rotation and level control
βββ requirements.txt
βββ pyproject.toml # Packaging metadata + pytest/coverage config
β
βββ audio_analysis/ # Business logic β no PyQt5 here
β βββ key_detection.py # analyze_track() orchestrator
β βββ energy_detection.py
β βββ groove_analysis.py
β βββ mood_classification.py
β
βββ gui/
β βββ main_window.py # PyQt5 window, QThread workers, dialogs
β βββ file_manager/
β βββ organizer.py # File discovery, organize, M3U generation
β
βββ utils/
β βββ camelot_map.py # CAMELOT_MAP + compatibility helpers
β βββ transition_scoring.py # Multi-dimension transition scoring
β βββ translations.py # i18n strings
β βββ dj_tips.py # Contextual DJ tips
β
βββ tests/
β βββ conftest.py # Shared fixtures
β βββ unit/ # Fast unit tests (no audio files needed)
β
βββ docs/
β βββ ARCHITECTURE.md
β βββ CAMELOT_SYSTEM.md
β βββ CONFIGURATION.md
β βββ CONTRIBUTING.md
β
βββ assets/ # Images used by the GUI
# Unit tests only (fast β no audio files, no display required)
python -m pytest tests/unit/ -v
# With coverage report
python -m pytest tests/unit/ \
--cov=audio_analysis --cov=gui/file_manager --cov=utils --cov=config \
--cov-report=term-missingpip install flake8
flake8 . --select=E9,F63,F7,F82 --exclude=venv,.venvSee docs/CONTRIBUTING.md for the full developer guide: branching model, commit conventions, architecture rules, and PR process.
Audio file
β
βββ detect_key_from_audio() β key + Camelot code + confidence
βββ detect_bpm() β BPM
βββ analyze_groove() β kick/swing/percussion profile
βββ classify_mood() β tonality / aggressiveness / tension
βββ analyze_energy() β level / brightness / density / curve
β
βββ analyze_track() dict β consumed by GUI, organizer, playlist, scoring
Two tracks are harmonically compatible if their Camelot codes differ by:
- 0 β same key
- 0, AβB β relative major/minor (same number, different letter)
- Β±1 β adjacent position on the wheel
utils/camelot_map.py implements all compatibility checks and provides a 0β100 score.
.mp3 Β· .wav Β· .flac Β· .ogg Β· .m4a Β· .aac Β· .aiff
GUI fails to launch
python -c "from gui.main_window import DJAnalyzerGUI"Shows the exact import error.
Key detection returns "Unknown"
- Check librosa is installed:
pip show librosa - Check the file is valid: try playing it in another app
- See
logs/dj_analyzer.logfor the full error
libsndfile not found on Linux
sudo apt install libsndfile1Pull requests are welcome! Please read docs/CONTRIBUTING.md first.
Open a bug report or feature request using the GitHub issue templates.
MIT Β© 2026 Camel-Hot contributors
