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

Element: clef

Description

Clefs are represented by a combination of sign, line, and clef-octave-change elements.

Derived By

Type clef

Attributes
Name  Type  Required?  Default  Description 
number  staff-number  No  The optional number attribute refers to staff numbers within the part. A value of 1 is assumed if not present.
additional  yes-no  No  Sometimes clefs are added to the staff in non-standard line positions, either to indicate cue passages, or when there are multiple clefs present simultaneously on one staff. In this situation, the additional attribute is set to "yes" and the line value is ignored.
size  symbol-size  No  The size attribute is used for clefs where the additional attribute is "yes". It is typically used to indicate cue clefs. The after-barline attribute is set to "yes" in this situation. The attribute is ignored for mid-measure clefs. 
after-barline  yes-no  No  Sometimes clefs at the start of a measure need to appear after the barline rather than before, as for cues or for use after a repeated section.
default-x  tenths  No 
default-y  tenths  No 
relative-x  tenths  No 
relative-y  tenths  No 
font-family  comma-separated-text  No 
font-style  font-style  No 
font-size  font-size  No 
font-weight  font-weight  No 
color  color  No 
print-object  yes-no  No 
Content Model

Contains elements as defined in the following table.

Component  Type  Occurs  Default  Description 
  1..1 
sign  clef-sign  1..1 

The sign element represents the clef symbol.

line  staff-line  0..1  Line numbers are counted from the bottom of the staff. Standard values are 2 for the G sign (treble clef), 4 for the F sign (bass clef), 3 for the C sign (alto clef) and 5 for TAB (on a 6-line staff).
clef-octave-change  xs:integer  0..1 

The clef-octave-change element is used for transposing clefs. A treble clef for tenors would have a value of -1.

Referenced By
Example

Bass clef

        <clef>
          <sign>F</sign>
          <line>4</line>
        </clef>

Treble clef

        <clef>
          <sign>G</sign>
          <line>2</line>
        </clef>

Vocal tenor clef

        <clef>
          <sign>G</sign>
          <line>2</line>
          <clef-octave-change>-1</clef-octave-change>
        </clef>

Alto clef

        <clef>
          <sign>C</sign>
          <line>3</line>
        </clef>

Tenor clef

        <pitch>
          <sign>C</sign>
          <line>4</line>
        </pitch>

Soprano clef

        <clef>
          <sign>C</sign>
          <line>1</line>
        </clef>

Mezzo soprano clef

        <clef>
          <sign>C</sign>
          <line>2</line>
        </clef>

Baritone clef

        <clef>
          <sign>C</sign>
          <line>5</line>
        </clef>

Baritone clef

        <clef>
          <sign>F</sign>
          <line>3</line>
        </clef>

Bass clef (down octave)

        <clef>
          <sign>F</sign>
          <line>4</line>
          <clef-octave-change>-1</clef-octave-change>
        </clef>

Percussion clef

        <clef>
          <sign>percussion</sign>
        </clef>

TAB clef

        <clef>
          <sign>TAB</sign>
          <line>5</line>
        </clef>
Definition

See attributes

 

MusicXML Documentation Home
Last built 2/20/2015

7007 Winchester Circle, Suite 140

Boulder, CO 80301