Pi Loom is an AI-powered music composer that transforms the digits of π into harmonious musical patterns. This project was created for the π-Day AI Hackathon 2025.
- π-Based Composition: Converts π's digits into musical notes based on scales and keys
- AI Pattern Recognition: Detects and highlights patterns within π's sequence
- Harmony Generation: Creates complementary harmonies based on the main melody
- Interactive Visualization: Visualizes the note frequencies and detected patterns
- Customizable Parameters: Adjust tempo, key, scale, and AI enhancement settings
- 3D Visualization: Interactive 3D representation of π on the landing page
- Digit to Note Conversion: Each digit of π is mapped to a note in the selected musical scale
- Pattern Detection: The AI analyzes the sequence to find repeating patterns
- Melody Enhancement: Based on detected patterns, the AI can enhance the melody
- Harmony Generation: Optional harmonies can be generated to complement the main melody
- Interactive Playback: Users can play the composition with various waveforms and tempos
Pi Loom uses several technologies:
- Next.js: React framework for the user interface
- Web Audio API: For generating and playing musical notes
- Chart.js: For visualizing note frequencies
- AI Pattern Recognition: Custom algorithm to detect patterns in π's digits
- Framer Motion: For smooth animations
- Three.js: For 3D visualization of π on the landing page
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
- Adjust the composition settings (number of digits, key, scale, tempo)
- Enable AI enhancement if desired
- Click the Play button to hear the π-based composition
- Experiment with different waveforms and harmony options
- Observe the patterns detected by the AI
- More advanced musical scales and modes
- Machine learning for more sophisticated pattern recognition
- Downloadable MIDI export
- Visual representation of π's digits alongside the music
- Collaborative composition features
This project is licensed under the MIT License.

