Skip to content

Interactive drum machine that uses Python and Clingo to generate the best beat based on your selected sounds. The solver evaluates musical features like centroid, spread, and peak using Answer Set Programming

License

Notifications You must be signed in to change notification settings

jsvaldezv/clingo-drum-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🥁 Clingo Drum Machine

Clingo.Drum.Machine.Demo.mov

This project is an interactive drum machine built with Python and Clingo. It allows you to choose which sounds will represent the kick, snare, and hi-hat. Using Answer Set Programming (ASP) via Clingo, the system then analyzes and selects the best combination of sound design and rhythm pattern.

The solver evaluates multiple beat configurations and selects the optimal loop based on centroid, spectral spread, and maximum peak, aiming to create a musically cohesive and dynamic groove. This fusion of audio analysis and logic programming results in a powerful tool for generative beat creation.

Local running

1. Create venv

python3 -m venv venv
source venv/bin/activate

2. Install dependencies

(venv) pip install -r requirements.txt

3. Run main file

(venv) python Python/main.py

Recommendations

1. Run black to format your files with Python coding standards

(venv) black .

About

Interactive drum machine that uses Python and Clingo to generate the best beat based on your selected sounds. The solver evaluates musical features like centroid, spread, and peak using Answer Set Programming

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors