Rainbow Piano App
✓ Published2🌍 Public
A Rainbow Piano App renders a virtual, interactive piano with both white and black keys. The visualization demonstrates realistic 3D effects through CSS gradients and shadows, while allowing playback through mouse clicks, touch events, or keyboard shortcuts mapped to specific notes. The built-in demo melody plays a simple scale, with audio synthesis generated via the Web Audio API and visual feedback provided through CSS transitions on key presses.
AI-generated descriptionInteractive Piano
This visualization creates an interactive piano with playable keys:
Features
- Fully functional virtual piano with white and black keys
- Interactive keys that can be played with mouse or touch
- Keyboard support for playing notes (keys A-S-D-F-G-H-J-K-L-; for white keys, W-E-T-Y-U-O-P for black keys)
- Visual feedback when keys are pressed
- Built-in demo melody that plays a simple scale
- Realistic piano design with 3D effects and shadows
- Audio generated using Web Audio API
Technical Implementation
The visualization demonstrates:
- DOM manipulation to create piano keys dynamically
- CSS gradients and shadows for realistic 3D piano key appearance
- Web Audio API for generating musical tones with proper frequencies
- Event handling for mouse, touch, and keyboard inputs
- Visual feedback with CSS transitions
- Audio synthesis with gain control for natural sound decay
- Responsive design that works on different screen sizes
The piano provides an interactive musical experience while demonstrating various front-end techniques for creating realistic instrument interfaces.
MIT Licensed