You are here: MusicXML Reference > Score Schema (XSD) > Complex Types > Complex Type: clef

Complex Type: clef

Description

Clefs are represented by a combination of sign, line, and clef-octave-change elements. Clefs appear at the start of each system unless the print-object attribute has been set to "no" or the additional attribute has been set to "yes".

Derived By

Restricting xs:anyType

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
Definition
<xs:complexType name="clef">
  <xs:annotation>
    <xs:documentation>Clefs are represented by a combination of sign, line, and clef-octave-change elements. The optional number attribute refers to staff numbers within the part. A value of 1 is assumed if not present.

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. The size attribute is used for clefs where the additional attribute is "yes". It is typically used to indicate cue clefs.

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. The after-barline attribute is set to "yes" in this situation. The attribute is ignored for mid-measure clefs.

Clefs appear at the start of each system unless the print-object attribute has been set to "no" or the additional attribute has been set to "yes".</xs:documentation>
  </xs:annotation>
  <xs:sequence>
    <xs:element name="sign" type="clef-sign">
      <xs:annotation>
        <xs:documentation>The sign element represents the clef symbol.</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="line" type="staff-line" minOccurs="0">
      <xs:annotation>
        <xs:documentation>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).</xs:documentation>
      </xs:annotation>
    </xs:element>
    <xs:element name="clef-octave-change" type="xs:integer" minOccurs="0">
      <xs:annotation>
        <xs:documentation>The clef-octave-change element is used for transposing clefs. A treble clef for tenors would have a value of -1.</xs:documentation>
      </xs:annotation>
    </xs:element>
  </xs:sequence>
  <xs:attribute name="number" type="staff-number">
    <xsd:annotation>
      <xsd:documentation>
      </xsd:documentation>
    </xsd:annotation>
  </xs:attribute>
  <xs:attribute name="additional" type="yes-no">
    <xsd:annotation>
      <xsd:documentation>
      </xsd:documentation>
    </xsd:annotation>
  </xs:attribute>
  <xs:attribute name="size" type="symbol-size">
    <xsd:annotation>
      <xsd:documentation>
      </xsd:documentation>
    </xsd:annotation>
  </xs:attribute>
  <xs:attribute name="after-barline" type="yes-no">
    <xsd:annotation>
      <xsd:documentation>
      </xsd:documentation>
    </xsd:annotation>
  </xs:attribute>
  <xs:attributeGroup ref="print-style" />
  <xs:attributeGroup ref="print-object" />
</xs:complexType>

 

MusicXML Documentation Home
Last built 2/20/2015

7007 Winchester Circle, Suite 140

Boulder, CO 80301