WaveRoll Piano is a VS Code extension for viewing, editing, and playing MIDI files with an interactive piano roll visualization. Supports conversion between MIDI and MIDI-TSV formats.
Built on top of WaveRoll, an interactive JavaScript library for MIDI piano roll visualization.
Features
- Piano Roll Visualization: View MIDI files as an interactive piano roll display powered by the wave-roll library
- Audio Playback: Play MIDI files directly in VS Code using Tone.js synthesis with multiple piano sounds (Default / Salamander C5)
- MIDI-TSV Conversion: View and edit MIDI as a text-based TSV representation — switch between Preview and Edit mode, modify TSV text, then save to write back to MIDI
- Multi-File Comparison: Load multiple MIDI files for side-by-side visualization
- Audio Reference Import: Add a reference audio track (
.wav,.mp3,.m4a,.ogg) - MIDI Export: Export modified MIDI files to disk
- Format Support:
.mid,.midi,.mid.tsv,.midi.tsv
Installation
- Open VS Code
- Go to Extensions
- Search for "WaveRoll Piano"
- Click Install
Or install directly from the VS Code Marketplace or Open VSX.
Usage
- Open any
.mid,.midi,.mid.tsv, or.midi.tsvfile in VS Code - The file automatically opens in the WaveRoll Piano viewer
- Use the player controls to interact with the MIDI file
- Click Add MIDI Files to layer additional MIDI files for comparison
- Click Add Audio File to load a reference audio track
TSV Editing
The right panel displays a MIDI-TSV text representation of the MIDI file:
- Preview mode: Click on TSV rows to seek in the playback timeline
- Edit mode: Click the ✎ icon in the panel header to switch to a text editor. Modify the TSV text, then press Cmd+S / Ctrl+S to save. The TSV is converted back to MIDI and written to disk.
MIDI-TSV Commands
Right-click a MIDI file in the explorer to:
- Export MIDI as TSV: Convert
.mid/.midito.mid.tsv - Export MIDI-TSV as MIDI: Convert
.mid.tsv/.midi.tsvto.mid/.midi
Controls
- Play/Pause: Start or pause MIDI playback
- Stop: Stop playback and reset to beginning
- Tempo: Click the BPM badge to adjust playback tempo
- Export: Export MIDI with the current tempo setting
- Piano Sound: Switch between Default and Salamander C5 piano samples
Related Projects
- WaveRoll Library: GitHub | NPM
- Web Demo: https://crescent-stdio.github.io/wave-roll/
- Standalone Demo: https://crescent-stdio.github.io/wave-roll/standalone.html
Tech Stack
- wave-roll: Interactive piano roll rendering engine
- Tone.js: Web Audio synthesis framework
- @tonejs/midi: MIDI file parsing
- midi-file: Binary MIDI parsing and serialization
- esbuild: Fast JavaScript bundler
License
MIT