<clef>

<clef> Indication of the exact location of a particular note on the staff and, therefore, the other notes as well.
Module MEI.shared
Attributes
@altsym (optional) Provides a way of pointing to a user-defined symbol. It must contain an ID of a <symbolDef> element elsewhere in the document. Value conforms to data.URI . att.altsym
@cautionary (optional) Records the function of the clef. A "cautionary" clef does not change the following pitches. Value conforms to data.BOOLEAN . att.clef.log
@color (optional) Used to indicate visual appearance. Do not confuse this with the musical term 'color' as used in pre-CMN notation. Value conforms to data.COLOR . att.color
@copyof (optional) Points to an element of which the current element is a copy. Value conforms to data.URI . att.common.anl
@corresp (optional) Used to point to other elements that correspond to this one in a generic fashion. One or more values from data.URI , separated by spaces. att.common.anl
@dis (optional) Records the amount of octave displacement. Value conforms to data.OCTAVE.DIS . att.octavedisplacement
@dis.place (optional) Records the direction of octave displacement. Value conforms to data.PLACE . att.octavedisplacement
@facs (optional) Permits the current element to reference a facsimile surface or image zone which corresponds to it. One or more values from data.URI , separated by spaces. att.facsimile
@fontfam (optional) Contains the name of a font-family. Value conforms to data.FONTFAMILY . att.typography
@fontname (optional) Holds the name of a font. Value conforms to data.FONTNAME . att.typography
@fontsize (optional) Indicates the size of a font expressed in printers' points, i.e., 1/72nd of an inch, relative terms, e.g., "small", "larger", etc., or percentage values relative to "normal" size, e.g., "125%". Value conforms to data.FONTSIZE . att.typography
@fontstyle (optional) Records the style of a font, i.e, italic, oblique, or normal. Value conforms to data.FONTSTYLE . att.typography
@fontweight (optional) Used to indicate bold type. Value conforms to data.FONTWEIGHT . att.typography
@glyphname (optional) Glyph name. Value of datatype string. att.extsym
@glyphnum (optional) Numeric glyph reference in hexadecimal notation, e.g. "#xE000" or "U+E000". N.B. SMuFL version 1.18 uses the range U+E000 - U+ECBF. Value of datatype a string matching the following regular expression: "(#x|U\+)[A-F0-9]+" . att.extsym
@label (optional) Provides a name or label for an element. The value may be any string. Value of datatype string. att.commonPart
@layer (optional) Identifies the layer to which a feature applies. One or more values of datatype positiveInteger, separated by spaces. att.layerident
@line (optional) Indicates the line upon which a feature stands. The value must be in the range between 1 and the number of lines on the staff. The numbering of lines starts with the lowest line of the staff. Value conforms to data.CLEFLINE . att.lineloc
@n (optional) Provides a number-like designation for an element. Value conforms to token . att.common
@next (optional) Used to point to the next event(s) in a user-defined collection. One or more values from data.URI , separated by spaces. att.common.anl
@oct (optional) Captures written octave information. Value conforms to data.OCTAVE . att.octave
@prev (optional) Points to the previous event(s) in a user-defined collection. One or more values from data.URI , separated by spaces. att.common.anl
@sameas (optional) Points to an element that is the same as the current element but is not a literal copy of the current element. One or more values from data.URI , separated by spaces. att.common.anl
@shape (optional) Describes a clef's shape. Value conforms to data.CLEFSHAPE . att.clefshape
@staff (optional) Signifies the staff on which a notated event occurs or to which a control event applies. Mandatory when applicable. One or more values of datatype positiveInteger, separated by spaces. att.staffident
@synch (optional) Points to elements that are synchronous with the current element. One or more values from data.URI , separated by spaces. att.common.anl
@tstamp (optional) Encodes the onset time in terms of musical time, i.e., beats[.fractional_beat_part]. Value conforms to data.BEAT . att.timestamp.musical
@tstamp.ges (optional) Captures performed onset time in several forms; that is, ppq (MIDI clicks and MusicXML 'divisions'), Humdrum **recip values, beats, seconds, or mensural duration values. Value conforms to data.DURATION.gestural . att.timestamp.performed
@tstamp.real (optional) Used to record the onset time in terms of ISO time. Value conforms to data.ISOTIME . att.timestamp.performed
@when (optional) Indicates the point of occurrence of this feature along a time line. Its value must be the ID of a when element elsewhere in the document. Value conforms to data.URI . att.alignment
@xml:base (optional) Provides a base URI reference with which applications can resolve relative URI references into absolute URI references. Value conforms to data.URI . att.commonPart
@xml:id (optional) Regularizes the naming of an element and thus facilitates building links between it and other resources. Each id attribute within a document must have a unique value. Value of datatype ID. att.id
Member of
Contained by
May contain
Empty
Declaration
<classes>
<memberOf key= " att.common" />
<memberOf key= " att.event" />
<memberOf key= " att.facsimile" />
<memberOf key= " att.clef.anl" />
<memberOf key= " att.clef.ges" />
<memberOf key= " att.clef.log" />
<memberOf key= " att.clef.vis" />
<memberOf key= " model.eventLike" />
<memberOf key= " model.staffDefPart" />
</classes>
<content>
<rng:empty/>
</content>
Remarks

This element can be used as an alternative to the staff element's clef.* attributes. It should be used when specific display info, such as size or color, needs to be recorded for the clef or when multiple, simultaneous clefs occur on a single staff. This element may also be used within the staff context to indicate changes of clef.

Constraints
The clef position must be less than or equal to the number of lines of an ancestor staff.
<sch:rule context= "mei:clef[ancestor::mei:staffDef[@lines]]">
<sch:let name= "thisstaff" value= "ancestor::mei:staffDef/@n"/>
<sch:assert test= "number(@line) <= number(ancestor::mei:staffDef[@n=$thisstaff and @lines][1]/@lines)"> The clef position must be less than or equal to the number of lines of an ancestor staff. </sch:assert>
</sch:rule>
Constraints
The clef position must be less than or equal to the number of lines of a preceding staff.
<sch:rule context= "mei:clef[ancestor::mei:staffDef[not(@lines)]]">
<sch:let name= "thisstaff" value= "ancestor::mei:staffDef/@n"/>
<sch:assert test= "number(@line) <= number(preceding::mei:staffDef[@n=$thisstaff and @lines][1]/@lines)"> The clef position must be less than or equal to the number of lines of a preceding staff. </sch:assert>
</sch:rule>

MEI Guidelines Version 3.0.0

MEI Elements