2025

Avicii: AI DJ Engine

An AI DJ engine that analyzes your music and automatically mixes a seamless, professional-grade set.

UI/UX Designer & Engineer
Audio AI ยท Creative Systems๐Ÿ† Cal Hacks 2025 ProjectVisit live site โ†—
overview

Avicii is an AI DJ engine that turns any playlist into a fully automated, professionally mixed DJ set. Instead of relying on expensive hardware or manual beatmatching skills, Avicii analyzes the structure of songs, including BPM, key, energy curves, vocal presence, and rhythmic patterns, and intelligently generates smooth transitions between tracks. The system uses audio separation (stems), music feature extraction, and transformer-based audio understanding (CLAP model) to determine which songs are compatible and exactly where transitions should occur, outputting a continuous mixed audio file with optimized crossfades, beat-aligned transitions, and energy-aware sequencing.

Avicii: AI DJ Engine

The goals

  • โœฆMake DJing accessible to anyone, with no hardware, no training, and no music theory required
  • โœฆTranslate real DJ intuition (energy flow, beat matching, transitions) into algorithmic decision-making
  • โœฆAutomatically generate musically coherent mixes that feel intentional, not random
  • โœฆBuild a full pipeline from raw audio to analysis to AI decision system to final mixed output

What I did

  • โœ“Built the full DJ intelligence pipeline, including BPM detection, key extraction, energy curve modeling, and structural audio segmentation using librosa
  • โœ“Implemented stem separation using Demucs to isolate vocals, drums, and instrumentation for more precise mixing control
  • โœ“Designed the mixing decision engine, integrating a CLAP transformer model to score song compatibility and determine optimal transition points from energy alignment, rhythmic structure, and semantic audio features
  • โœ“Built a Flask-based web interface with dynamic crossfade and beat-aligned transition logic, connecting backend audio processing to a simple upload, mix, and download workflow

What's inside

Audio intelligence engine

Analyzes each track using BPM detection, key estimation, energy curve mapping, and spectral features to build a structured representation of the song, turning raw audio into a navigable timeline of musical intensity.

AI mixing system

A scoring model evaluates compatibility between tracks based on rhythm, energy progression, key harmony, and vocal overlap risk, selecting transition points that maximize musical coherence while preserving creative variation.

Stem-based mixing

Demucs-based source separation isolates vocals and instruments, enabling cleaner transitions and preventing vocal clashes during crossfades.

CLAP semantic understanding

A transformer-based CLAP model adds high-level reasoning about genre and mood, ensuring mixes feel stylistically consistent even across BPM or key differences.

Automated DJ output

Once the optimal sequence is determined, Avicii generates a continuous multitrack mix with beat-synced transitions and exports a final audio file ready for playback.

Tools & skills

PythonFlaskLibrosaDemucsCLAP Transformer ModelAudio Signal ProcessingFFT AnalysisBeat TrackingEnergy Curve ModelingHTML/CSSWeb Audio Pipelines

The results

โ†’Live web app generating full AI DJ mixes from uploaded songs
โ†’End-to-end pipeline: raw audio โ†’ feature extraction โ†’ AI mixing logic โ†’ exported mix
โ†’Successfully models DJ decision-making using computational energy and rhythm analysis
โ†’Hackathon-built system demonstrating real-time creative audio intelligence
Avicii: AI DJ Engine screenshot 2
Avicii: AI DJ Engine screenshot 3
Avicii: AI DJ Engine screenshot 4