DP
Day 5: Digital Piano
Play notes by clicking keys or using the keyboard. Built with the Web Audio API and keyboard events.
Octave: 4
Keyboard mapping (default): A W S E D F T G Y H U J K
Tip: Hold key to sustain. Use Octave +/- to move up/down.
How it works (short)
JavaScript creates an AudioContext and maps notes to frequencies. When a key is pressed/clicked it creates an oscillator + gain node and applies a short ADSR envelope. Key release stops the note and cleans up nodes.