AUD · Audio tools

MIDI Merger and Splitter

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

Oxyd To cut, arrange and export the whole episode with chapters and a loudness target: Edit the episode in Oxyd

MIDI Merger and Splitter

Merge, split and convert Standard MIDI Files without opening a sequencer. The work happens on raw events, so a file with pedal data, pitch bend, SysEx patches or karaoke lyrics comes out with all of it still in place.

Add one or more files, pick a job, and download the result. The list under the drop area shows what each file contains before anything is written: format, track count, resolution, length, tempo, time signature, channels in use and track names.

Merge MIDI files

Two arrangements cover the two reasons people merge.

Layer starts every file at tick zero and puts their tracks side by side in a format 1 file. Use it when the drums, bass and keys of one song were exported as separate files. One timeline can only follow one tempo map, so the first file in the list supplies the tempo, time signature and key signature events. Move the file with the correct tempo to the top with the arrow buttons.

Append plays the files one after another in list order. Track 1 of each file continues track 1 of the file before it, track 2 continues track 2, and so on. Each file’s tempo and time signature changes move with it. With “Start each file on the next bar line” ticked, a file that ends partway through a bar is followed by silence up to the bar line, so the next section lands on a downbeat.

Program changes, controller values and pitch bend are channel state, and a MIDI file has no event that resets them between sections. In an appended file, a channel keeps the instrument and controller values the previous section left unless the next section sets its own.

Mixed resolutions

Each MIDI file declares how many ticks make a quarter note: 96, 192, 480 and 960 are common. Merging files with different values means moving them onto one grid.

The merged file uses the least common multiple of the source resolutions. Files at 96 and 480 are written at 480, and files at 96 and 120 at 480 as well, so every tick maps to a whole tick and nothing shifts. The file header stores the resolution in 15 bits, so the largest value is 32767. When the least common multiple is larger, the finest source grid is used and the page says that timings were rounded.

Split by track or by channel

Splitting writes one single-track file per part and offers them as a ZIP or one at a time.

  • By track suits format 1 files, where each instrument already has a track. A track that holds only tempo and signatures is not written as a part.
  • By channel suits format 0 files, where one track holds all 16 channels. Channel 10 is the drum channel in General MIDI.

Every part receives a copy of the full tempo map, the time signatures and the key signatures. Without them a part taken from track 3 of a song at 140 BPM would play at the MIDI default of 120.

Track names, lyrics, markers and SysEx carry no channel number. In a channel split they follow their track’s channel when that track uses exactly one. Anything left over goes to a last part named no-channel, so the parts together still contain every event of the source.

Format 0 and format 1

Converting to format 0 folds all tracks into one, sorted by tick. Events that share a tick keep their track order, so a tempo change in the first track still comes before the notes it applies to, and a note-off still comes before a new note-on of the same key.

Converting a single-track file to format 1 writes a conductor track holding tempo, signatures, text and SysEx, followed by one track per channel in use. A file that is already format 1 with several tracks is written back unchanged.

Format 2 files, which hold independent patterns, are read as separate tracks. They are rare outside older hardware sequencers.

CSV and JSON

The CSV follows the midicsv layout, one event per line:

0, 0, Header, 1, 2, 480
1, 0, Start_track
1, 0, Tempo, 500000
1, 0, End_track
2, 0, Start_track
2, 0, Note_on_c, 1, 79, 81
2, 960, Note_off_c, 1, 79, 0
2, 960, End_track
0, 0, End_of_file

Tracks count from 1, channels from 0, and times are absolute ticks. Text is quoted, and bytes outside printable ASCII are written as octal escapes such as \351, which keeps Latin-1 and Shift-JIS lyrics intact through a text editor.

The JSON holds the same records as objects with named fields (note, velocity, controller, microsecondsPerQuarter) and adds each event’s time in seconds, calculated through every tempo change. A script reads it with one JSON.parse call, which suits analysis better than the CSV does.

A CSV dropped into the file list is read back as a MIDI file. Choose Convert and “The same format, rewritten” to save it as .mid.

Limits

  • Files are written with a status byte on every event. Some sources omit repeated status bytes to save space, so a rewritten file can be a few percent larger while holding identical events.
  • Chunks that are not track data, which a few sequencers add for their own settings, are skipped.
  • Nothing is quantized, transposed or renamed here. Use the MIDI editor for changes to notes, and MIDI to audio to hear or render the result.

Frequently Asked Questions

It merges, splits and converts Standard MIDI Files (.mid, .midi, .kar, and .rmi) in format 0, 1 or 2, and writes any of them as CSV or JSON text. It also opens a CSV in the midicsv layout and turns it back into a MIDI file. It does not play the files or change individual notes.

Every event, at its original tick: notes, controllers, program changes, pitch bend, aftertouch, SysEx, lyrics, markers, track names and tempo changes. Events are moved between tracks or files as whole messages and never rebuilt from the notes, which is the difference from a piano-roll editor.

Layered files share one timeline, so the first file in the list supplies the tempo, time signature and key signature events and the same events from the other files are left out. Appended files each keep their own tempo changes, shifted to where that file starts. A file that sets no tempo gets 120 BPM restored at its start if the file before it ended on another tempo.

Not when a shared grid exists. Files at 96 and 480 ticks per quarter note are written at 480, where every original tick lands exactly. If the least common multiple is larger than 32,767, the limit of the file header, the finest source grid is used and the others are rounded onto it by less than half a tick.

Format 0 holds everything in one track and is what hardware keyboards, sound modules, karaoke players and many game engines expect. Format 1 holds one track per part and is what a sequencer shows as separate lanes. Both carry the same events and sound the same.

It lists one event per line as track, tick, type and values, in the layout of the midicsv program, so a spreadsheet, a script or a diff can read a MIDI file. Edit the text, drop the CSV back in and choose Convert to get a MIDI file again.

No. A file whose header counts ticks per frame and a file that counts ticks per quarter note have no common timeline without choosing a tempo for one of them, so the merge is refused with that reason. Two files with the same SMPTE division merge normally, and a SMPTE file splits, converts and exports like any other.

Explore Our Tools

Browse all tools