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- Exactly one of the following
- In this order
- In this order
- <key-step> (Required)
- <key-alter> (Required)
- <key-accidental> (Optional)
- <key-octave> (Zero or more times)
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