A QWERTY keyboard library for Web Audio projects with configurable polyphony and intelligent key event handling.
AudioKeys is a JavaScript library that provides a QWERTY keyboard interface for Web Audio projects, mapping key presses to musical notes with configurable polyphony and note priority. It solves the problem of handling complex keyboard interactions for browser-based audio applications, allowing developers to focus on sound generation rather than key event logic.
Web audio developers and musicians building interactive audio applications in the browser, such as synthesizers, sequencers, or music education tools.
Developers choose AudioKeys for its simplicity, flexibility, and intelligent handling of key events—including edge cases like tab switching—without imposing any specific audio synthesis approach, making it easy to integrate into custom Web Audio setups.
:musical_keyboard: a QWERTY keyboard for web audio projects
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically manages key up/down events and fires note off events when the browser window loses focus, preventing stuck notes—a common issue in web audio apps, as mentioned in the README.
Supports monophonic or polyphonic modes with note priority settings (last, first, highest, lowest), allowing fine-tuned control for synth designs, detailed in the API section.
Offers two mapping layouts with optional octave shifting and velocity selection via the 'rows' property, providing adaptability for different musical interfaces, illustrated in the README diagrams.
Callbacks provide MIDI note numbers, frequencies, and velocity values, making integration with Web Audio nodes straightforward, as shown in the note object example.
The README's TODO list explicitly notes that MIDI support is not yet implemented, limiting its use for projects requiring external hardware integration.
Designed solely for computer keyboards, with no built-in support for touch inputs, mobile devices, or alternative controllers, restricting its applicability.
Lacks a demo site (as admitted in TODO) and only provides a basic test example, making it harder for beginners to grasp advanced use cases without trial and error.