1

How to edit the tempo of a MIDI file? I have a .mid file; when opened it will play at a tempo of 60 BPM. I want to change that to 120.
Not that it plays faster at 120 BPM.

So 60 = 120

I try to find '60' with all kinds of text editors, to change that to 120. But I can't read the code (text).

Please help me figure it out.

1 Answer 1

3

A text editor will not help with this; you'd need a hex editor. The thirteenth and fourteenth bytes in the file specify the number of ticks per quarter note (where "quarter note" does not necessarily correspond to a real quarter note, but is just a unit of time):

00000000: 4d 54 68 64 00 00 00 06 00 00 00 01 00 78 4d 54  MThd.........xMT
                                              ^^^^^

Double this value to double the playback speed. In this example, the new value would be 7816 × 2 = F016, i.e., 00 f0.


It would be much easier to open and change the file in any MIDI sequencer.

3
  • This is the best answer to my question, now I know where to looke for and possible chances. Whitch midi sequencer could do this (the easy way)?
    – Radko
    Commented Sep 30, 2018 at 6:32
  • Any sequencer should be able to do this.
    – CL.
    Commented Sep 30, 2018 at 11:19
  • I couldn't figure out how to do this in Cubase, but this comment completely saved me. I needed to change the bpm of the midi (120->128) but keep the length of the notes in seconds, so I could change the number there in the 13th and 14th byte by -7% and then in Cubase when moving from 120->128 finally it was correct. Or just about, probably should have used a slightly different number than 7%.
    – Matthias
    Commented May 10 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.