DEV Community

AI Tool Research Lab
AI Tool Research Lab

Posted on

Building a Browser MIDI Editing Workflow After Audio Conversion

An audio-to-MIDI model rarely produces a finished arrangement. The practical output is a draft: notes may be too short, duplicated, shifted by an octave, assigned to the wrong instrument, or split into tracks that still need cleanup.

That makes the editor—not just the converter—part of the workflow.

1. Preserve the raw result

Download the original .mid file and keep it unchanged. Make an editable copy before deleting notes or changing tempo. This gives you a baseline when an edit makes the result worse and preserves evidence for comparing conversion methods.

2. Import and inspect structure

Open the MIDI in a piano-roll editor and check:

  • tempo and time signature;
  • track count and instrument assignments;
  • the lowest and highest detected pitches;
  • whether the first musical event aligns with the intended start;
  • clusters of very short notes;
  • overlapping notes that should represent one sustained event.

PureMIDI's online MIDI editor currently supports browser-side MIDI import, a piano-roll view, multiple tracks, instrument selection, mute/solo/visibility controls, note drawing and erasing, velocity editing, undo/redo, playback, and MIDI export. Some score-derived projects can also expose MusicXML or Guitar Pro-related export paths; those capabilities should not be promised for every imported file.

3. Fix global errors first

Correct errors that affect the whole file before editing individual notes:

  1. Align the start time.
  2. Correct tempo if the imported value is wrong.
  3. Transpose octave-shifted material by 12 semitones.
  4. Assign sensible instruments and track names.
  5. Mute or hide tracks while isolating a problem part.

Global corrections make local note errors easier to see.

4. Clean notes in short sections

Work phrase by phrase. Remove obvious false notes, extend notes that end too early, separate accidental overlaps, and listen after each small batch of changes. Velocity should be edited after pitches and timing are stable; otherwise time is spent polishing notes that may later be deleted.

Keyboard shortcuts and undo/redo matter here because transcription cleanup involves many reversible micro-edits. A useful editor should make the comparison between the original phrase and the changed MIDI fast.

5. Keep track decisions explicit

For multi-track files, record why a track was deleted, merged, duplicated, muted, or assigned another instrument. If the result will be used in a DAW, export a clean MIDI version before adding DAW-specific instruments and effects.

6. Export and verify

After exporting:

  • reopen the new MIDI file;
  • verify track count, tempo, notes, and instruments;
  • listen from the beginning and around every edited boundary;
  • confirm that the exported file—not only the in-memory editor state—contains the changes.

This round-trip check catches export bugs and unsupported metadata before the source project is closed.

A repeatable cleanup checklist

[ ] Raw conversion preserved
[ ] Tempo and time signature checked
[ ] Start offset corrected
[ ] Octave range checked
[ ] Track names and instruments reviewed
[ ] False and duplicate notes removed
[ ] Note lengths corrected
[ ] Velocity reviewed
[ ] Exported MIDI reopened and verified
Enter fullscreen mode Exit fullscreen mode

Production verification

The public, self-owned benchmark MIDI imports successfully and displays one track with 18 notes. The piano-roll screenshot contains no conversion ID or personal filename.

The first production round-trip check failed: changing the imported file from 120 BPM to 110 BPM and exporting preserved 18 notes and one track, but the parsed duration changed from 17.843 seconds to 8.922 seconds. The cause was a 220 PPQ source being exported with a default 480 PPQ header while retaining the original tick values.

The fix was deployed to production in merge commit f62bbe7efe8ea9addbe7508cb21c6471323eedd6. A fresh browser round trip on https://puremidi.com/midi-editor-online imported the frozen benchmark, changed the tempo from 120 BPM to 110 BPM, and exported 220 PPQ, 110.00011 BPM, one track, 18 notes, and a 19.465-second duration. The production round-trip verification now passes.

Top comments (0)