<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MusicUnderstanding",
  "identifier" : "/documentation/MusicUnderstanding/KeyResult/KeySignature",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Music Understanding"
    ],
    "preciseIdentifier" : "s:18MusicUnderstanding9KeyResultV0C9SignatureV"
  },
  "title" : "KeyResult.KeySignature"
}
-->

# KeyResult.KeySignature

The set of sharp and flat symbols for the notes.

```
struct KeySignature
```

## Overview

A key signature pairs a root note, [`tonic`](/documentation/MusicUnderstanding/KeyResult/KeySignature/tonic) with a [`mode`](/documentation/MusicUnderstanding/KeyResult/KeySignature/mode), major or minor, to describe the harmonic center of a section of audio.

## Topics

### Tonic and mode

[`let tonic: KeyResult.Tonic`](/documentation/MusicUnderstanding/KeyResult/KeySignature/tonic)

The root note of the musical key.

[`let mode: KeyResult.Mode`](/documentation/MusicUnderstanding/KeyResult/KeySignature/mode)

The mode of the musical key.

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Encodable`](/documentation/Swift/Encodable)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Decodable`](/documentation/Swift/Decodable)

[`Hashable`](/documentation/Swift/Hashable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)