Time and bar math

MIDI duration calculator

Open a .mid file and see its exact duration in seconds, bars, and quarter-note beats, plus every tempo point that changes the result.

Local file processing
A MIDI timeline ruler showing bars, beats, tempo changes, and a total duration readout
Duration follows the tempo map and the latest event tick, not the length of the audio file that inspired the MIDI.
1 Open a MIDI file2 Read the result3 Continue with a tool

Open a MIDI file

Stay on-device. Start empty if you have no file, or try a public demo.

Off-grid notes, wild velocities, leftover gaps — the dirty AI-song export producers actually get.

A clean four-bar piano phrase you can transpose, quantize, or reshape immediately.

Drums, bass, and chords on separate tracks for mute, solo, and merge practice.

The same hook after quantize and velocity cleanup — the after shot for the messy export.

Your file stays on this device unless you explicitly use Creator Cloud. After an edit, one local recovery copy is saved in this browser until you replace or clear it.

Creator Cloud

Keep the versions and extend the phrase.

Creator Cloud adds cloud history and reviewed AI MIDI edits a month. The tool you are using stays free.

  • 60 reviewed AI MIDI edits each month
  • 50 cloud projects with 100 versions each
  • Cancel anytime; the free editor stays free
See Creator Cloud · $7.99/mo

How MIDI duration is calculated

MIDI stores event positions as ticks. The file PPQ says how many ticks make a quarter note, and tempo events say how long each quarter note lasts in microseconds. EditMIDI walks the tempo map, converts the latest event tick into seconds, and reports the total.

The latest event wins, even when the last note ended earlier. A trailing marker, controller, or End of Track event can extend the measured length. That is useful for checking a file that needs to line up with a video or a fixed slot.

Bars are a reading aid, not a guarantee

The bar count uses the first time signature in the file. A 7/8 file is measured with seven eighth notes per bar, while a 4/4 file uses four quarter notes. Later meter changes are visible in the editor but are not folded into one automatic bar total.

For a song with several sections, use the tempo table and the piano roll together. The calculator gives you the whole-file number; the arrangement still decides where a bar line belongs musically.

Practical uses for the number

Use the duration to fit a cue to a video, check whether a loop is exactly two bars, estimate how much space a track needs on an album, or confirm that a generated MIDI is the length you requested. The beats field is handy when you need to convert a musical position rather than a clock time.

If the duration looks wrong, check the tempo map first. A file exported at 120 BPM but intended for 90 BPM will have the right tick positions and the wrong real-time length. The tempo changer can replace the map, but it changes playback speed without moving notes.

What the calculator cannot tell you

It does not know about audio tails, reverb, or a DAW’s count-in. It measures the MIDI timeline, not the finished recording. It also does not stretch audio or preserve vocals; those are audio-editing jobs, not MIDI tempo jobs.

The file stays local, and the report can be downloaded as JSON for a session log. Opening a file here does not change it, so you can inspect several versions and compare their lengths before choosing one.

Keep the same file

All EditMIDI tools

Open the full index

Every page runs on the same browser MIDI engine, so you can move between them without uploading or re-importing your file.