The AI DJ Mix Generator is a groundbreaking tool that combines artificial intelligence and expert insights from the DJing realm. Leveraging XML metadata from Rekordbox, a renowned DJ software by Pioneer DJ, and honed with a private music collection, this project is not just advancing existing technologies but also safeguarding the artistry intrinsic to DJing.
Part of this project, the lstm_model.pth
, a critical component for generating cue points, is derived from the AI Cue Point Generator. This model undergoes regular updates to enhance its precision and performance, drawing from continuous retraining on larger datasets. The scaler.joblib
plays a vital role in preprocessing new data, ensuring the model's seamless operation and integration.
- Main Objective
- AI-Generated Cue Points
- AI DJ Mix Generator
- Techniques Employed
- Getting Started
- Contributing
- License
- Contact
- Demo Links
The main goal here is to craft a tool that injects a fresh, automated twist into the DJing process, all while honoring the craftsmanship and expertise a seasoned DJ brings to a live set. This tool is designed to automate the creation of unique, high-quality, and seamless mixes that were traditionally crafted manually.
This part of the project delineates the creation of the AI model that generates cue points in tracks. The steps involved in this notebook are as follows:
- Importing Data from Rekordbox: This step involves importing data from 24 tracks via Rekordbox, where cue point labels and timestamps are extracted for supervised training.
- Labels: Here, timestamps are labeled, indicating whether they represent cue points, thus creating a supervised dataset for training the model.
- LSTM Model for AI Cue Point Generator: This step entails implementing an LSTM Neural Network using PyTorch, which identifies patterns that signal cue points.
This part encapsulates the functionalities and techniques embedded in the AI DJ Mix Generator, which includes the following elements:
- Preprocessing Step: This step is about initializing Track class objects with essential attributes like beats, BPM, audio file, and sample rate.
- Mod and BPM Detection: This process identifies the dominant BPM and tweaks other tracks to align with this tempo, ensuring uniform BPM across all tracks.
- Cue Point Detection: This part utilizes the model and scaler from the AI Cue Point Generator to pinpoint significant cue points in each track.
- Randomness via Relevant Cue Point Selection & Randomness: This aspect incorporates a semi-random strategy to choose cue points, creating a vibrant and unique mix.
- Frequency Equalization of the Songs (EQing): This process involves adjusting the frequency components of the songs, facilitating smoother transitions.
- Final Step: Generating a Mix: This final step merges the adjusted audio files based on the determined cue points to produce a seamless mix.
This section elaborates on the techniques utilized in both the AI Cue Point Generator and the AI DJ Mix Generator, encompassing:
- Reading from WAV File: This step initiates the preprocessing of tracks by reading audio files from the "wav" format.
- Beat Detection: This process retrieves critical beat information using various libraries, with Madmom offering the most precise results.
- BPM Estimation: This essential step estimates the songs' BPM, a critical component in aligning tracks during the mix process.
- Feature Extraction for Each Beat Timestamp: This step extracts features for each beat timestamp using the Librosa library, encompassing aspects like MFCC, Spectral Centroid, Spectral Contrast, Spectral Rolloff, Spectral Flux, and RMS.
Ready to dive in? Here's how you can kick start your journey with the AI DJ Mix Generator!
-
Clone the Repository: First off, clone the project repository onto your local machine.
-
Setting Up Your Environment: Before you start, ensure to establish a virtual environment to manage dependencies. You can do this with the command:
python3 -m venv env
- Installing Dependencies: Navigate to the project directory and install the necessary dependencies using the
requirements.txt
file. Run the following command in your terminal:
pip install -r requirements.txt
-
Adding Your Music: Create a folder with all the tracks you want to mix and add it to the current working directory.
-
Running the Script: Now, it's time to generate your mix! Run the
main.py
script and provide the path to your music folder when prompted. Like so:
python main.py
"Enter the path to the folder of music: " -> < path to folder goes here >
The project is available under the MIT license. You can find the license details in the MITLicense.txt file in the project repository.
Feel free to get in touch at ruszkowskifranciszek@gmail.com.