Have you ever wished to create unique compositions by mixing various music elements with ease? Welcome to the world of Polymath! This powerful tool harnesses the magic of machine learning to convert your music library into a well-organized production sample library. Whether you’re a music producer, DJ, or audio developer, Polymath streamlines your workflow, allowing for creativity at the speed of sound.
What is Polymath?
Polymath revolutionizes music production by automatically separating songs into stems (like beats, bass, etc.), quantizing them to the same tempo and beat-grid (e.g., 120 BPM), and analyzing musical structures, keys, and other vital information. Imagine Polymath as a skilled chef that meticulously prepares a variety of ingredients (music elements), ensuring they are ready for you to whip up your culinary masterpiece (unique compositions).
Use Cases of Polymath
- Unique Compositions: Easily combine beats from different songs. For example, mix a beat from Funkadelic with a bassline from Tito Puente and integrate them into your Digital Audio Workstation (DAW) effortlessly.
- Effortless DJ Sets: With Polymath’s search capabilities, discovering related tracks to create a seamless hour-long mash-up DJ set becomes a breeze.
- Streamlined Data Creation: For machine learning developers, Polymath simplifies creating a vast music dataset for training generative models.
How Does it Work?
Polymath uses various advanced neural networks and processes to achieve its remarkable capabilities:
- Music Source Separation: Utilizes the Demucs neural network.
- Music Structure Segmentation: Labels songs with the help of the sf_segmenter neural network.
- Music Pitch Tracking: Detects musical keys using the Crepe neural network.
- Music to MIDI Transcription: Converts audio files to MIDI through the Basic Pitch neural network.
- Music Quantization and Alignment: Managed by pyrubberband.
- Music Info Retrieval: Processes audio information using librosa.
Getting Started with Polymath
Requirements
Before diving in, ensure you have the following software installed:
- ffmpeg
- Python version 3.7 to 3.10
Installation Steps
git clone https://github.com/samim23/polymath
cd polymath
pip install -r requirements.txt
Setting Up GPU Support
If you want to leverage GPU support, follow the instructions on TensorFlow’s installation guide for CUDA. After installation, TensorFlow and PyTorch should automatically utilize your GPU.
Docker Setup
If you’re familiar with Docker, you can quickly build a Polymath docker image using:
docker build -t polymath .
Don’t forget to create the necessary directories to manage your input and output files properly.
Running Polymath – Simple Steps
Follow these steps to run Polymath:
- Add songs to your Polymath Library:
- Add YouTube videos:
python polymath.py -a n6DAqMFe97E - Add audio files:
python polymath.py -a pathtoaudiolibsong.wav - Add multiple files:
python polymath.py -a n6DAqMFe97E,eaPzCHEQExs
- Add YouTube videos:
- Quantize Songs: Adjust tempo by using the command:
python polymath.py -q n6DAqMFe97E -t 120 - Search for Similar Songs: Find tracks that match your needs:
python polymath.py -s n6DAqMFe97E -sa 10 - Convert Audio to MIDI: Convert processed files to MIDI:
python polymath.py -a n6DAqMFe97E -q all -t 120 -m
Troubleshooting
If you run into issues with dependencies, especially with Basic Pitch, you might want to run:
pip install git+https://github.com/spotify/basic-pitch.git
Don’t forget that Polymath is continuously evolving, and keeping an eye on updates can enhance your experience. For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Conclusion
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

