This project is a JavaScript-based polyrhythm visualizer and sound generator, built to explore fundamental and advanced JS concepts such as animation with Canvas, math for rhythmic timing, and audio generation using the Web Audio API.
The goal of this project is both educational and creative — to learn deeper JavaScript techniques by building a fully interactive musical tool from scratch.
- ⭕ Canvas-based animation for visualizing polyrhythms in real time
- 🎵 Sound generation using
AudioContextand oscillators - 🧠 Custom logic and math to calculate timing intervals for different rhythm layers
- 🎛️ Configurable number of beats for each track (e.g., 3:2, 5:4, etc.)
- 🔄 Smooth looping and synchronized beat playback
- JavaScript
- HTML/CSS
- Canvas API
- Web Audio API
- Working with the
<canvas>API for custom visuals and real-time drawing - Using the
AudioContextinterface for generating procedural sound - Building an animation loop using
requestAnimationFrame - Applying modular arithmetic and time-based scheduling for polyrhythms
- Structuring code for better reusability and logic separation
- Clone the repo:
git clone https://github.com/muskanqed/Polyrhythms_JavaScript_Project