swing.md 2.2 KB


source: https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/swing/

downloaded: 2026-01-30T08:45:46.824Z

The element | MusicXML 4.0

MusicXML 4.0 >

MusicXML reference >
Elements >
swing

The element

Parent element:

    <sound>

The element specifies whether or not to use swing playback, where consecutive on-beat / off-beat eighth or 16th notes are played with unequal nominal durations.

The and elements are positive integers that specify the ratio between durations of consecutive notes. For example, a element with a value of 2 and a element with a value of 1 applied to eighth notes specifies a quarter note / eighth note tuplet playback, where the first note is twice as long as the second note. Ratios should be specified with the smallest integers possible. For example, a ratio of 6 to 4 should be specified as 3 to 2 instead.

The element has no effect for playback of grace notes, notes where a element is not present, and notes where the specified is different than the nominal value associated with the specified . If a swung note has attack and release attributes, those values modify the swung playback.

Content

In this order

  • Exactly one of the following

            <straight> 
    

    In this order

            <first> (Required)
    
    
    
    
    
            <second> (Required)
    
    
    
    
    
            <swing-type> (Optional)
    
  • In this order

            <first> (Required)
    
    
    
    
    
            <second> (Required)
    
    
    
    
    
            <swing-type> (Optional)
    
  • (Required)

  • (Required)

  • (Optional)

  • (Optional)

  • Attributes

    None.

    Examples

    This element is used in the following examples:

    , ,