In musical notation, a bar (or measure) is a segment of time corresponding to a specific number of beats in which each beat is represented by a particular note value and the boundaries of the bar are indicated by vertical bar lines.
Dividing music into bars provides regular reference points to pinpoint locations within a musical composition.
It also makes written music easier to follow, since each bar of staff symbols can be read and played as a batch.
In American English, although the words bar and measure are often used interchangeably, the correct use of the word 'bar' refers only to the vertical line itself, while the word 'measure' refers to the beats contained between bars.
In international usage, it is equally correct to speak of bar numbers and measure numbers, e.g. ‘bars 9–16’ or ‘mm.
Along the same lines, it is usually recommended to reserve the abbreviated form ‘bb.
3–4’ etc. for beats only; bars should be referred to by name in full.
The first metrically complete bar within a piece of music is called ‘bar 1’ or ‘m.
When the piece begins with an anacrusis (an incomplete bar at the head of a piece of music), ‘bar 1’ or ‘m.
1’ is the following bar.
Originally, the word bar came from the vertical lines drawn through the staff to mark off metrical units and not the bar-like (i.e., rectangular) dimensions of a typical measure of music.
In British English, these vertical lines are called bar, too, but often the term bar line is used in order to make the distinction clear.
A double bar line (or double bar) can consist of two single bar lines drawn close together, separating two sections within a piece, or a bar line followed by a thicker bar line, indicating the end of a piece or movement.
Note that double bar refers not to a type of bar (i.e., measure), but to a type of bar line.
Another term for the bar line denoting the end of a piece of music is music end.
A repeat sign (or, repeat bar line) looks like the music end, but it has two dots, one above the other, indicating that the section of music that is before is to be repeated.
The beginning of the repeated passage can be marked by a begin-repeat sign; if this is absent the repeat is understood to be from the beginning of the piece or movement.
This begin-repeat sign, if appearing at the beginning of a staff, does not act as a bar line because no bar is before it; its only function is to indicate the beginning of the passage to be repeated.
In music employing mixed meters, bar lines are instead used to indicate the beginning of rhythmic note groups, but this is subject to wide variation: some composers use dashed bar lines, others (including Hugo Distler) have placed bar lines at different places in the different parts to indicate varied groupings from part to part.
Igor Stravinsky said of bar lines:
The earliest barlines, used in keyboard and vihuela music in the 15th and 16th centuries, didn't reflect a regular meter at all but were only section divisions, or in some cases marked off every beat.
Barlines began to be introduced into ensemble music in the late 16th century but continued to be used irregularly for a time.
Not until the mid-17th century were barlines used in the modern style with every measure being the same length, and they began to be associated with time signatures.
Modern editions of early music that was originally notated without barlines sometimes use a mensurstrich as a compromise.
Thus a beat is to a measure as a measure/hyperbeat is to a hypermeasure.
Hypermeasures must be larger than a notated bar, perceived as a unit, consist of a pattern of strong and weak beats, and along with adjacent hypermeasures, which must be of the same length, create a sense of hypermeter.
Credits to the contents of this page go to the authors of the corresponding Wikipedia page: en.wikipedia.org/wiki/Bar (music).