MusicXML 4.1 Draft
MusicXML 4.1 Draft > MusicXML Reference > Elements > The <key> element

The <key> element

Parent element: <attributes>

The key element represents a key signature. Both traditional and non-traditional key signatures are supported. The optional number attribute refers to staff numbers. If absent, the key signature applies to all staves in the part.

Content

In this order

Attributes

Name Type Required? Description
color color No
default-x tenths No
default-y tenths No
font-family font-family No
font-size font-size No
font-style font-style No
font-weight font-weight No
id xs:ID No
number staff-number No
print-object yes-no No
relative-x tenths No
relative-y tenths No

Examples

This element is used in the following examples:

<assess> and <player><attributes><cancel><concert-score> and <for-part><double><instrument-change><key-octave><key> (Non-Traditional)<key> (Traditional)<measure-distance><part-symbol><pedal> (Lines)<score-timewise><staff-type><staves><transpose>Tutorial: Après un rêveTutorial: Chopin PreludeTutorial: Chord SymbolsTutorial: Hello, WorldTutorial: PercussionTutorial: Tablature