MIDILACE Runs on your device
TERM GUIDE · METER

What a measure is: a container of beats, measured in seconds.

A measure — a bar — is the span of time between two bar lines, and the time signature decides how many beats fit inside it. That is a definition about notation, not about audio: a measure is a container you impose on seconds. At the tempo a MIDI player falls back to when a file declares none — 120 BPM — one quarter note lasts 0.500 seconds, so a 4/4 bar is 2.000 seconds. The site's 4.40-second export holds 11 onsets: 6 in the first bar, 5 in the second, and three of them sit within 177 ms of the bar line at 2.000 s. The busiest point in the file is the bar line itself.

Convert a clip and find its bar lines
THE DEFINITION, IN SECONDS

A measure is a count of beats, and a beat has a duration

Two numbers define a bar. The top number of the time signature says how many beats go in it; the bottom says which note value counts as one beat. 4/4 is four quarter notes; 3/4 is three; 6/8 is six eighth notes. None of that is audible on its own — what makes a measure real is the tempo, because tempo turns note values into seconds.

How long one bar lasts at the 120 BPM default a MIDI player applies when the file declares no tempo
Time signatureOne beat lastsOne bar lastsWhat it is counting
4/40.500 s (quarter)2.000 sfour beats, the most common rock and pop frame
3/40.500 s (quarter)1.500 sthree beats, one strong beat per bar
2/40.500 s (quarter)1.000 stwo beats, a march frame
6/80.250 s (eighth)1.500 ssix eighths, heard as two groups of three
12/80.250 s (eighth)3.000 stwelve eighths, four groups of three

Read the 3/4 and 6/8 rows together: both bars last 1.500 s, and they are not the same measure. Three beats of 0.500 s and six beats of 0.250 s group the same span differently, which is why a player hearing the file will tap either three or six times per bar. A bar is not a length of time; it is a length of time plus a grouping.

WHAT THE FILE HOLDS

The export has no bar lines, and the format has no event for them

A Standard MIDI File can declare its meter with a time-signature meta event (0xFF 0x58). The export of the site's 4.40-second test mix declares none — nor a tempo event, nor a key signature. There is also no bar-line event in the format at all: bar lines exist only on a staff, which is a rendering decision made after the file is read.

So the bars below were imposed, not found. The file gives onset times in seconds; the meter comes from you, or from whatever default the notation software applies. That is the honest order of operations, and it is why two people can open the same export and see 4/4 in one program and 2/4 in another with no contradiction — both are reading the same seconds into different containers.

Eleven onsets across a 4.40-second export, split into two 4/4 bars of 2.000 seconds each. Six onsets fall in bar one, five in bar two, and three onsets sit within 177 milliseconds of the 2.000-second bar line.
Two imposed bars: 6 onsets in the first, 5 in the second, and the bar line where they crowd.
BAR BY BAR

Where the 11 onsets land, beat by beat

The export holds 13 events at 11 distinct onset times — two onsets carry two simultaneous notes. Laid into 4/4 bars at 120 BPM, the distribution is lopsided in a way that is worth seeing before you decide the meter is right.

The 4.40-second export read as two 4/4 bars at 120 BPM
Bar · beatWindowOnsets insideEvents
1 · beat 10.000–0.500 s0.000 s2 (A3, A4)
1 · beat 20.500–1.000 s0.731 s, 0.986 s3
1 · beat 31.000–1.500 snone0
1 · beat 41.500–2.000 s1.742 s, 1.823 s, 1.986 s3
2 · beat 12.000–2.500 s2.009 s1
2 · beat 22.500–3.000 s2.961 s, 2.985 s2
2 · beat 33.000–3.500 snone0
2 · beat 43.500–4.000 s3.821 s, 3.902 s2

Two measured details make the bar reading checkable. The last note ends at 4.008 s — 8 ms after the second bar line — so the sounding content is two bars plus an 8 ms overhang, followed by 0.392 s of silence before the 4.40-second file ends. And beats 3 of both bars are empty: the two bars are not four equal pieces of music, they are four slots, two of which happen to be silent.

WHY THE BOUNDARY MATTERS

The bar line is where a wrong meter does the most damage

Three onsets sit at 1.823, 1.986 and 2.009 s. The first two are 177 ms and 14 ms before the bar line; the third is 9 ms after it. Musically that is one gesture straddling the boundary — and the boundary is a choice you made, not a fact in the file. Move the bar line 200 ms earlier and the same three onsets land in a different bar with different beat numbers, and any notation built on them is renumbered.

That is why the practical answer to "what is a measure" is not the textbook definition alone. A measure is a bet about where the strong beat falls. On this file the bet is well supported — the onsets cluster at 0.000, 1.000 and 2.000 s and the empty beat 3 gives the phrase room — but it remains a bet, and the file will not confirm it for you.

QUICK ANSWERS

Questions about measures

Is a measure the same as a bar?

Yes. Bar is the British term, measure the American one, and both mean the span between two bar lines. The word "bar" also names the line itself, which is why "bar line" exists as a separate term.

How many seconds is a bar?

It depends on two things: the time signature and the tempo. At 120 BPM a 4/4 bar is 2.000 s and a 3/4 bar is 1.500 s. Halve the tempo and both double. A file with no tempo event is read at 120 BPM, which is why the numbers above apply to it.

Does a MIDI file contain bar lines?

No. It contains note events with tick positions, and a division of 480 ticks per quarter note in this file. Bar lines are drawn by the notation program from the time signature it assumes — and this export declares none, so the program supplies one.

Why does the same file show different bar counts in different programs?

Because the meter is assumed, not read. A program that defaults to 4/4 and one that defaults to 3/4 will place bar lines at different points in the same seconds. Neither is wrong about the notes; they disagree about the container.

What if the song has no steady beat?

Then a measure is a poor container and the notation will fight the recording. The measured file has a steady 0.500 s pulse and takes bars cleanly; a rubato piano intro does not, and the honest move there is to notate without bar lines or to pick a bar that follows the phrasing rather than the clock.