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.
The position of a clef may be specified using either @line or @loc, but not both. The @line attribute numbers staff lines starting with 1 for the bottom line. The @loc attribute uses data.STAFFLOC: integer MEI virtual units (half the distance between adjacent staff lines), with 0 at the bottom line, positive values above it, and negative values below it. For a position on a staff line, loc = 2 * (line - 1). Thus, line="1" and loc="0" are alternative ways to specify the bottom line, while loc="5" specifies the space between the third and fourth lines. The @loc attribute allows clefs to be placed on spaces as well as lines.
<elementSpec xmlns="http://www.tei-c.org/ns/1.0" rend="add" ident="clef" module="MEI.shared"><desc xml:lang="en">Indication of the exact location of a particular note on the staff and, therefore,
the
other notes as well.</desc>
<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"/>
<memberOf key="model.syllablePart"/>
</classes>
<content>
<empty/>
</content>
<constraintSpec ident="clef_line_loc_exclusive" scheme="schematron">
<constraint>
<sch:rule context="mei:clef">
<sch:assert test="not(@line and @loc)">The @line and @loc attributes must not be used
together on the same clef.</sch:assert>
</sch:rule>
</constraint>
</constraintSpec>
<constraintSpec ident="Clef_position_lines" scheme="schematron">
<constraint>
<sch:rule context="mei:clef[@line][matches(@shape, '[FCG]')][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>
</constraint>
</constraintSpec>
<constraintSpec ident="Clef_position_nolines" scheme="schematron">
<constraint>
<sch:rule context="mei:clef[@line][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>
</constraint>
</constraintSpec>
<remarks xml:lang="en">
<p>This element can be used as an alternative to the <gi scheme="MEI">staff</gi> 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.</p>
<p>The position of a clef may be specified using either <att>line</att> or <att>loc</att>,
but not both. The <att>line</att> attribute numbers staff lines starting with
<val>1</val>
for the bottom line. The <att>loc</att> attribute uses
<ident type="datatype">data.STAFFLOC</ident>: integer MEI virtual units (half the distance
between adjacent staff lines), with
<val>0</val> at the bottom line, positive values above
it, and negative values below it. For a position on a staff line, loc = 2 * (line
- 1).
Thus, line="1" and loc="0" are alternative ways to specify the bottom line, while
loc="5" specifies the space between the third and fourth lines. The <att>loc</att> attribute
allows clefs to be placed on spaces as well as lines.
</p>
</remarks></elementSpec>