In written music, a grouping of pulses into a convenient unit falls between two barlines. A barline is a vertical line that crosses the stave at regular intervals. The bar begins with the downbeat and ends immediately before the next downbeat, and will contain a constant number of beats of the type determined by the time signature, e.g., a bar of 4/4 will have four quarter-note beats.