Home / Software / MIDI File Dump


MIDI File Dump

A command-line DOS program which will open a MIDI file and dump its contents to the screen in a raw, barely readable format which is ideal for programmers.

Download the MIDIFile ZIP Archive.


Chunk: MThd (6 bytes)
  Header:  Type 1, 2 Tracks, Time Division = 256 Ticks/Beat
Chunk: MTrk (101 bytes)
  Event:  delta time = 0, META, Time Signature, PARAMS    4 2 24 8 
  Event:  delta time = 0, META, Key Signature, PARAMS    0 0 
  Event:  delta time = 0, META, Time Signature, PARAMS    4 2 24 8 
  Event:  delta time = 0, META, Set Tempo, PARAMS    909090 
  Event:  delta time = 9216, META, Time Signature, PARAMS    3 2 24 8 
  Event:  delta time = 2304, META, Time Signature, PARAMS    4 2 24 8 
  Event:  delta time = 11776, META, Set Tempo, PARAMS    1500000 
  Event:  delta time = 1536, META, Time Signature, PARAMS    3 2 24 8 
  Event:  delta time = 768, META, Time Signature, PARAMS    4 2 24 8 
  Event:  delta time = 8448, META, Set Tempo, PARAMS    6000000 
  Event:  delta time = 256, META, Set Tempo, PARAMS    1500000 
  Event:  delta time = 2560, META, Set Tempo, PARAMS    909090 
  Event:  delta time = 1, META, End of Track, PARAMS    
Chunk: MTrk (2654 bytes)
  Event:  delta time = 0, META, Track Name, BYTES    Violoncello
  Event:  delta time = 0, CHANNEL, Controller, PARAMS    10 63 
  Event:  delta time = 0, CHANNEL, Controller, PARAMS    10 63 
  Event:  delta time = 0, CHANNEL, Controller, PARAMS    0 1 
  Event:  delta time = 0, CHANNEL, Controller, PARAMS    32 0 
  Event:  delta time = 0, CHANNEL, Program Change, PARAMS    0 
  Event:  delta time = 0, CHANNEL, Note On, PARAMS    63 22 
  Event:  delta time = 974, CHANNEL, Note On, PARAMS    63 0 
  Event:  delta time = 50, CHANNEL, Note On, PARAMS    63 36 

Sample Output

Introduction

This MIDIFile program was the first step I took towards understanding the structure and contents of MIDI files. Even though it is quite rudimentary, I still use it when writing and debugging my own MIDI software programs, especially when I find some MIDI file that's acting strange in some sequencer, notation program, or whatever.

If you want to see where I went with my use of MIDI files, see MusicGraph.

Installation

Once you have downloaded the zip file, decompress the contents. It contains a single file, the MIDIFile.exe executable. Open up a DOS shell, change your directory (CD) to be the same as where the MIDIFile.exe executable is located, and then execute the program.

When the program executes, it will prompt you for a MIDI file to dump. Alternatively, you can specify the MIDI file as an argument.

Since the dump just blats things to the screen, you may wish to save its output to a file so you can explore it at your leisure later. Do this with the > redirection symbol, as in:

MIDIFile.exe Cello8.mid >MIDI.out

Source Code

Download the "MIDIFile" source code ZIP file.

The partwrite program is written in Microsoft Visual C++. It should be fairly portable to other operating systems, though I haven't actually done this myself yet.

System Requirements

This program should run on pretty much any Microsoft Windows platform.

Licensing

This program and its software is freeware. It can be used by anyone for any purpose whatsoever.

I am, however, posting this software in the hopes that it will drive more traffic to my website. So, if you want to help me out, then please link to http://www.pnelsoncomposer.com. The link to the MIDIFile software can be found at: http://www.pnelsoncomposer.com/software/MIDIFile.

Thanks! Paul