BeatMosaic converts any image into 16 unique audio samples arranged in an interactive drum machine. Each section of a 4×4 grid maps to a segment of the image, generating sine, square, sawtooth, or triangle waves based on the image's pixel data — color, brightness, and texture all influence the sound.
- Image → Sample Pack — upload any image and instantly get 16 unique audio samples
- Interactive 4×4 Grid — click cells to play samples, like a browser-based MPC
- Dynamic Wave Synthesis — sine, square, sawtooth, and triangle waves derived from pixel data
- Effects & Modulation — reverb, delay, rhythmic patterns applied per-cell
- Record & Export — capture your session and save WAV files locally
- Streamlit UI — clean, browser-based interface with live image preview
git clone https://github.com/RhythrosaLabs/BeatMosaic.git
cd BeatMosaic
pip install -r requirements.txt
streamlit run main.pyThen open your browser to http://localhost:8501, upload an image, and start jamming.
- Python — core logic
- Streamlit — web UI
- Librosa — audio analysis and processing
- NumPy — pixel-to-waveform math
- Pillow — image loading and segmentation
- SoundFile — WAV export
- Upload an image → BeatMosaic splits it into a 4×4 grid (16 cells)
- Each cell's average color, brightness, and texture are extracted
- Those values map to waveform type, frequency, amplitude, and effects
- Click any cell to play its generated sample
- Record a sequence and export as a WAV file
Each image produces a completely different sonic palette. Try abstract art for ambient textures, or high-contrast photos for punchy drum hits.
PRs welcome! Open an issue first for major changes.
MIT
If BeatMosaic sparks some creativity, consider supporting development:
👉 Donate via PayPal — @noodlebake