MIDI cleanup
Fix the three things most played-in or downloaded MIDI files need: take out the drums (or any other channel), even out the velocities, and pull the timing onto the beat. You see exactly which notes changed before you download the cleaned file. Everything happens on your device; the file is never uploaded.
Cleanup
Or drag a file onto this box, or
Choose a MIDI file to clean up.
Before and after
| Change | Channel | Note | Before | After | Details |
|---|
Remove drums from a MIDI file
In General MIDI, drums are on channel 10, and each note number picks a drum sound rather than a pitch. Removing channel 10 therefore deletes the whole drum kit and leaves the melody, chords and bass. That is useful for a backing track to play drums along with, for notation, where drums would appear as random pitches, or before converting to sheet music. The cleanup tool ticks channel 10 by default when the file has one. Untick it to keep the drums, or tick any other channel to remove that instrument instead. Program changes and controllers on removed channels go too, so nothing is left behind. To keep every part but in separate files, use the MIDI track splitter.
This removes drums from a MIDI file, where the drums are separate note data. A recording (MP3 or WAV) has every instrument mixed into one waveform, so taking its drums out needs an audio stem-separation tool instead.
Change MIDI velocity
Velocity (1–127) is how hard each note was played, and most synths use it for loudness and tone. Played-in files often have a few notes much louder or softer than the rest. The options:
- Even out (normalize) moves every velocity toward a target by a percentage: 50% halves each note’s distance from the target, keeping some expression, while 100% sets them all to the target.
- Scale multiplies every velocity (80% makes the part quieter, 120% louder), keeping the relative dynamics.
- Set gives every note the same velocity, the usual choice for drum machines and step sequences.
- Fit into a range maps the full range 1–127 onto, say, 40–110, so nothing is inaudible or harsh.
Velocities are kept between 1 and 127. A velocity of 0 would turn a Note On into a Note Off, so the tool never writes it.
Quantize a MIDI file
Quantizing moves each note’s start toward the nearest line of a rhythmic grid. Strength sets how far: 100% snaps exactly onto the grid, 50% halves the timing error and keeps some human feel. Swing delays every second grid line, for a shuffled feel; 100% places the off-beat two thirds of the way through the beat, like a triplet. Choose triplet grids for music in triplets, otherwise notes are pulled to the wrong positions. By default each note keeps its length, so a note moved earlier also ends earlier; choose Quantize ends too to snap the ends to the grid as well. Drums are left alone by default because their timing is often intentional. Every note’s Note Off moves with its Note On, so quantizing never leaves a note hanging.
Check the result
The before-and-after table uses the same engine as MIDI compare, with no timing tolerance, so every moved note and changed velocity is listed. After downloading, play the file in the online MIDI player, or open it in the MIDI file analyzer, whose stuck-note check confirms that every note still ends. The played-in sample has timing up to 31 ticks off the grid, velocities from 38 to 122 and a drum part, so it shows all three operations. The code is the tested module cleanup-core.mjs.