CoolFace
Apppublic

SaraRay/Artificial-Harmony-Algorithm

sourceHugging Facemitupdated 10mo agoView on Hugging Face
0likes
App README

๐ŸŽต Artificial Harmony Algorithm

AI-powered music generation tool that creates unique harmonic mixes from audio samples

![GitHub](https://github.com/monrosara/Artificial-Harmony-Algorithm) ![Hugging Face](https://huggingface.co/spaces/SaraRay/Artificial-Harmony-Algorithm) ![License: MIT](https://opensource.org/licenses/MIT)

๐ŸŒŸ Overview

Artificial Harmony Algorithm is an innovative tool that uses algorithmic analysis and music theory principles to automatically generate harmonious music mixes from audio samples. The system analyzes BPM, key signatures, and harmonic compatibility to create unique compositions in real-time.

๐Ÿš€ Features

  • โ€”๐ŸŽต Smart Sample Analysis: Automatically detects BPM, key, and musical properties
  • โ€”โšก Real-time Generation: Create complete mixes in seconds
  • โ€”๐ŸŽจ Multiple Input Sources:
  • โ€”Pre-loaded sample library
  • โ€”Upload custom audio files (WAV, MP3, FLAC, AIFF)
  • โ€”Direct directory path specification
  • โ€”๐ŸŽ›๏ธ Advanced Controls:
  • โ€”BPM adjustment (80-180)
  • โ€”Camelot key system (1A-12B)
  • โ€”Layer control (1-8 layers)
  • โ€”Experimental mode for unusual combinations
  • โ€”๐Ÿ’พ High-Quality Output: Professional WAV format with metadata

๐ŸŽฏ Use Cases

  1. 1.Music Production: Generate backing tracks, loops, and inspiration
  2. 2.Content Creation: Create royalty-free background music for videos
  3. 3.Education: Demonstrate music theory and harmonic principles
  4. 4.Creative Exploration: Experiment with algorithmic composition
  5. 5.Sound Design: Generate unique sonic textures and atmospheres

๐Ÿ› ๏ธ Technical Details

Architecture

  • โ€”Frontend: Gradio web interface
  • โ€”Backend: Custom Python music processing engine
  • โ€”Audio Processing: Librosa, Pydub, SoundFile
  • โ€”Analysis: BPM detection, key estimation, harmonic matching

Key Algorithms

  1. 1.Beat Detection: Spectral flux and onset detection
  2. 2.Key Analysis: Chroma feature extraction and Camelot mapping
  3. 3.Harmonic Matching: Music theory-based compatibility scoring
  4. 4.Mix Generation: Multi-layer composition with time alignment

โš ๏ธ Note: The demo may take 30-60 seconds to load on first access due to server startup.

๐Ÿ“ฆ Installation

Local Installation

bash
# Clone repository
git clone https://github.com/monrosara/Artificial-Harmony-Algorithm.git
cd Artificial-Harmony-Algorithm

# Install dependencies
pip install -r requirements.txt

# Run application
python app.py