You are here: MusicXML Reference > Score Schema (XSD) > Elements > Element: barline

Element: barline [group music-data]

Description

If a barline is other than a normal single barline, it should be represented by a barline type that describes it. This includes information about repeats and multiple endings, as well as line style. Barline data is on the same level as the other musical data in a score - a child of a measure in a partwise score, or a part in a timewise score. This allows for barlines within measures, as in dotted barlines that subdivide measures in complex meters. The two fermata elements allow for fermatas on both sides of the barline (the lower one inverted).
If no location is specified, the right barline is the default.

Derived By

Type barline

Attributes
Name  Type  Required?  Default  Description 
location  right-left-middle  No  right  Barlines have a location attribute to make it easier to process barlines independently of the other musical data in a score. It is often easier to set up measures separately from entering notes. The location attribute must match where the barline element occurs within the rest of the musical data in the score. If location is left, it should be the first element in the measure, aside from the print, bookmark, and link elements. If location is right, it should be the last element, again with the possible exception of the print, bookmark, and link elements.
segno  xs:token  No  The segno attribute works the same way as the one in the sound element. It is used for playback when barline elements contain a segno element.
coda  xs:token  No  The coda attribute works the same way as the one in the sound element. It is used for playback when a barline element contains a coda child element.
divisions  divisions  No  The divisions attribute works the same way as the one in the sound element. It is used for playback when a barline element contains a divisions element.
Content Model

Contains elements as defined in the following table.

Component  Type  Occurs  Default  Description 
  1..1 
bar-style  bar-style-color  0..1 

The bar-style type represents barline style information. Choices are regular, dotted, dashed, heavy, light-light, light-heavy, heavy-light, heavy-heavy, tick (a short stroke through the top line), short (a partial barline between the 2nd and 4th lines), and none.

  0..1 
footnote  formatted-text  1..1  The footnote element specifies editorial information that appears in footnotes in the printed score. It is defined within a group due to its multiple uses within the MusicXML schema.
  0..1 
level  level  1..1  The level type is used to specify editorial information for different MusicXML elements.
wavy-line  wavy-line  0..1  Wavy lines are one way to indicate trills. When used with a measure element, they should always have type="continue" set.
segno  empty-print-style-align  0..1 

The segno element is the visual indicator of a segno sign. A sound element is needed to guide playback applications reliably.

coda  empty-print-style-align  0..1 

The coda element is the visual indicator of a coda sign. A sound element is needed to guide playback applications reliably.

fermata  fermata  0..2 

The fermata text content represents the shape of the fermata sign. An empty fermata element represents a normal fermata. The fermata type is upright if not specified.

ending  ending  0..1 

The ending type represents multiple (e.g. first and second) endings. Typically, the start type is associated with the left barline of the first measure in an ending. The stop and discontinue types are associated with the right barline of the last measure in an ending. Stop is used when the ending mark concludes with a downward jog, as is typical for first endings. Discontinue is used when there is no downward jog, as is typical for second endings that do not conclude a piece. The length of the jog can be specified using the end-length attribute. The text-x and text-y attributes are offsets that specify where the baseline of the start of the ending text appears, relative to the start of the ending line. The ending element text is used when the text displayed in the ending is different than what appears in the number attribute. The print-object element is used to indicate when an ending is present but not printed, as is often the case for many parts in a full score.

repeat  repeat  0..1 

The repeat type represents repeat marks. The start of the repeat has a forward direction while the end of the repeat has a backward direction. Backward repeats that are not part of an ending can use the times attribute to indicate the number of times the repeated section is played.

Referenced By
Example

      <barline location="right">
        <bar-style>light-light</bar-style>
      </barline>

 

MusicXML Documentation Home
Last built 2/20/2015

7007 Winchester Circle, Suite 140

Boulder, CO 80301