How herbit2004/keys-midi works
KEYS-MIDI is a browser-based virtual piano and multitrack MIDI workstation. Users play through computer-keyboard or on-screen keys; the controller maps notes to audio and updates the keyboard display. In the editor, recorded or imported notes can be organized and edited across instrument tracks, played back, and exported as a MIDI file. The README also documents undo/redo, percussion, and configurable sampled or synthesized instruments. Some editor and import/export wiring is described only in the README, so those links reflect documented capabilities rather than inspected call sites.
Main entry points: MainController.js App controller · AudioEngine.js Audio engine · MidiEditor.js MIDI editor · main.js Page entry
Components 14
App and input
- App controller
js/MainController.js - Page entry
js/main.js - Key mapping
js/KeyMapper.js
Audio and instruments
- Audio engine
js/AudioEngine.js - Instrument config
js/InstrumentConfig.js - Lazy loading
js/LoadingManager.js - Tone.js audio
js/Tone.js - Instrument samples
samples
MIDI workflow
- MIDI editor
js/MidiEditor.js - MIDI exporter
js/MidiExporter.js
Visual interface
- Piano display
js/VisualManager.js
Other components
- Musician
- Browser audio
- MIDI file
Connections 18
- Musician → Page entry: opens app
- Page entry → App controller: creates
- Musician → App controller: plays keys
- App controller → Key mapping: maps keys
- App controller → Audio engine: plays notes
- App controller → Instrument config: loads config
- App controller → Piano display: updates display
- Piano display → App controller: dispatches input
- App controller → MIDI editor: coordinates editing
- MIDI editor → Audio engine: plays notes
- MIDI editor → MIDI exporter: exports tracks
- MIDI file → MIDI editor: imports notes
- MIDI exporter → MIDI file: downloads file
- Audio engine → Lazy loading: tracks loading
- Audio engine → Tone.js audio: uses audio API
- Audio engine → Instrument samples: loads samples
- Audio engine → Browser audio: outputs sound
- Instrument config → Instrument samples: configures samples