Beat‑aware AI that lets you separate, edit, and blend tabla rhythms with any song right in your browser.
| ⭐ Why BeatFusion? |
|
frontend/ # React + Vite + Tailwind
├─ src/
│ ├─ components/ # Waveform, StemTrack, LoopBrowser...
│ └─ pages/ # UploadPage, EditorPage
└─ ...
backend/
├─ app.py # Flask entry‑point
├─ separater.py # Demucs wrapper
├─ overlay.py # Time‑stretch & mix‑down utilities
└─ loops/ # Curated tabla stems (.wav)
- Upload → file saved to
/tmp - /separate →
separater.pycalls Demucs, returns stem URLs - /overlay →
overlay.pytime‑stretches & mixes the chosen tabla loop - Result delivered as a streaming
.wav/.mp3
| Feature | Library |
|---|---|
| Waveform display | wavesurfer.js |
| Playback & scheduling | tone.js |
| State / data‑fetching | react‑query |
| Styling & layout | Tailwind CSS |
git clone https://github.com/ypatodkar/BeatFusion.git
cd BeatFusion
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt # Flask, Demucs, librosa, ...
cd frontend
npm install # React deps# Terminal 1
cd backend
python app.py # http://127.0.0.1:5000
# Terminal 2
cd frontend
npm run dev # http://localhost:5173Open the web app, drag‑and‑drop a song, click Separate, then audition tabla loops until you’re happy with the blend!
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload |
Multipart audio → returns song_id. |
| POST | /separate/<id> |
Runs Demucs → returns list of stems. |
| GET | /stems/<id> |
Streams a specific stem. |
| POST | /overlay |
{ song_id, stem, loop_name } → mixed WAV |
| GET | /loops |
Lists available tabla loops. |
OpenAPI / Swagger docs: http://localhost:5000/docs.
- Smart loop suggestion – LSTM / MusicGen model to generate bols that match melody.
- Beat‑grid editing – drag stems on a timeline, quantise to grid.
- Export stems separately – download individual tabla / vocals / drums tracks.
- Docker image – one‑shot deployment.
Pull requests are welcome!
Please file an issue before working on large changes.
- Fork →
git checkout -b feat/my-awesome-change - Run
pre-commit install(black + isort) - Add unit tests (
pytest) where possible.
MIT © 2025 Yash Patodkar
“Rhythm is a language; BeatFusion lets your code speak it.”