MIDI Piano Roll Editor
A MIDI file stores timed musical messages, not recorded sound. This editor maps 16 bars of 4/4 onto a piano roll where notes have exact MIDI pitch, start, length, velocity, channel and track. Add a note by clicking the grid or use the numerical inspector, arrange simultaneous notes on separate pitches, and add tempo events at any beat. Browser playback uses simple sine tones so you can check timing; another MIDI player may sound different. Import MIDI 1 Standard MIDI File formats 0 and 1 in the supported PPQ subset, and export format 1 with a conductor tempo track and one note track per editable track.
Key features
- Draw and select notes across 16 four-beat bars, with four bars and two octaves visible at a time.
- Edit start, length, MIDI pitch 0–127, velocity 1–127, channel 1–16 and up to four tracks.
- Add, replace or remove a tempo-map event at a beat from 0 to 64, with 40–240 BPM.
- Preview the sequence with Web Audio sine tones that follow tempo changes and overlap across different pitches.
- Import Standard MIDI File format 0 or 1 and export a valid format-1 .mid, roll PNG and note-timing CSV.
How to use
- Load the two-track example, import a .mid file, or click an empty roll cell to add a note.
- Choose a track, four-bar view and pitch range, then select a note in the roll or list and edit its exact values.
- Set or replace tempo events at their beat positions; play and stop the local preview to hear the timing.
- Download the MIDI file, labeled roll PNG or CSV of note start and end times, and reimport MIDI if needed.
Use cases
- Sketch a short melody and bass part with separate tracks and channels.
- Move a note by a sixteenth beat and compare note length and velocity.
- Inspect and revise a small existing MIDI file's notes and tempo map before using other music software.
Frequently asked questions
Is the preview the same sound as the exported MIDI?
No. This page previews notes as sine tones using Web Audio. The .mid file stores note, velocity, channel, track and tempo events but no samples. The receiving instrument determines its sound; percussion on channel 10 is also previewed as a sine tone here.
Which MIDI files can I import?
MIDI 1 Standard MIDI File format 0 or 1 with PPQ timing from 24 to 1920 is supported, up to 1 MB, 16 bars, 128 notes, four note tracks and 32 tempo events. SMPTE time division, MIDI 2.0 UMP, SysEx editing and unsupported or ambiguous overlapping identical-pitch notes are excluded. Other channel events are skipped.
Can two notes overlap?
Yes, different pitches, tracks or channels may overlap and play together. Two overlapping notes with the same pitch on the same track and channel are rejected because their MIDI note-off pairings are ambiguous.
How are tempo changes represented?
Tempo events store integer microseconds per beat, starting at tick zero. Playback integrates each segment. Export places Set Tempo meta events in a conductor track; the note ticks keep their exact positions and lengths.
What if an imported file has more data than the editor supports?
The file is rejected with a clear error rather than silently truncating notes or tempo. A supported import retains note pitch, timing, velocity, channel and tempo. Program changes, controllers and other unsupported events are not preserved on export.
Are MIDI files uploaded?
No. Parsing, editing, preview and file generation happen in browser memory. Downloads are created only when you choose an export button.
Privacy
Imported MIDI data stays in this browser tab and is not sent to an application API. The local preview creates temporary Web Audio oscillators; leaving the page stops them.
Comments & questions