0

I have one file that is 4/4 time, has 24 clocks per click, and 8 32nd notes per beat. I have no other information that could plausibly relate to the tempo. By experimentation, I think each tick (or whatever measurement delta time uses) is around one millisecond.

I have another file that is also 4/4 time, has 24 clocks per click, and 8 32nd notes per beat. It also has a tempo of 500000, which from what I can find is the default. By experimentation, each tick is about one 380th of a second.

Googling around was not helpful. I keep finding things that talk about stuff like pulses per quarter note. Which would be great if that was one of the numbers in the MIDI file. And they convert it to beats per minute, which isn't what I need. Though I do at least know what that means.

Is there an equation I can use to find how long a tick is using only numbers that are actually given in the MIDI file?

I'm using Mido to read the MIDI files, if that matters. Neither file has messages that fail to parse that would plausibly contain any missing information on tempo.

DanielLC
  • 5,801
  • 5
  • 18
  • 16
  • Read the [documentation](https://mido.readthedocs.io/en/latest/midi_files.html#tempo-and-beat-resolution). – CL. Apr 29 '20 at 07:28
  • I see. I had misread that, and was expecting a ticks_per_beat message. – DanielLC Apr 29 '20 at 08:09
  • Looking into it more, tempo/ticks_per_beat should give milliseconds per tick, and it works for that second file. But for the first file, the MIDI seems to play faster than that calculation suggests. – DanielLC Apr 29 '20 at 08:18
  • It gives *micro*seconds per tick. And I do not know what value your first file uses. – CL. Apr 29 '20 at 11:16

0 Answers0