Squirrel Logo

MIDI Dumper

Johan Vromans
Software & Tools


MIDI Dumper is a utility that reads a MIDI file and dumps it contents in an understandable way. Moreover, the dump can be edited (with care) and then used to generate a new MIDI file.

This is how a piece of a dumped MIDI file looks:

MIDI::Opus->new({
  'format' => 1,
  'ticks'  => 256,
  'tracks' => [   # 5 tracks...

    # Track #0 ...
    MIDI::Track->new({
      'type' => 'MTrk',
      'events' => [  # 3 events.
        ['time_signature', 0, 4, 2, 24, 8],       #       0  001-01-00-00  Time = 4/4, Click = 24, NoteQ = 8
        ['key_signature', 0, 0, 0],               #       0  001-01-00-00  Key = C
        ['set_tempo', 0, 600000],                 #       0  001-01-00-00  Tempo: q = 100
      ]
    }),
    
    # Track #1 ...
    MIDI::Track->new({
      'type' => 'MTrk',
      'events' => [  # 346 events.
        ['control_change', 0, 0, 0, 0],           #       0  001-01-00-00
        ['control_change', 0, 0, 32, 0],          #       0  001-01-00-00
        ['patch_change', 0, 0, 52],               #       0  001-01-00-00
        ['lyric', 128, '1.If '],                  #     128  001-01-08-00
        ['note_on', 0, 0, 70, 68],                #     128  001-01-08-00  A#3 on
        ['note_off', 128, 0, 70, 0],              #     256  001-02-00-00  A#3 off
        ['lyric', 0, 'ev'],                       #     256  001-02-00-00
        ['note_on', 0, 0, 70, 75],                #     256  001-02-00-00  A#3 on
        ['note_off', 128, 0, 70, 0],              #     384  001-02-08-00  A#3 off
        ...
        ['note_off', 256, 1, 62, 0],              #   31616  031-04-08-00  D3 off
        ['note_off', 1152, 1, 60, 0],             #   32768  033-01-00-00  C3 off
      ]
    }),
    
  ]
});

MIDI Dumper is included in the MIDI::Tweaks package.



© Copyright 2003-2018 Johan Vromans. All Rights Reserved.
software/sw_mididump.html last modified 23:16:21 08-Dec-2014