Root
public enum Root: String, CaseIterable, Codable, Comparable, Sendable
The root of a chord
Note
Changes to the raw value might break the databases-
None
Declaration
Swift
case none = "None"
-
C
Declaration
Swift
case c = "C"
-
C sharp
Declaration
Swift
case cSharp = "C#"
-
D
Declaration
Swift
case d = "D"
-
D sharp
Declaration
Swift
case dSharp = "D#"
-
D flat
Declaration
Swift
case dFlat = "Db"
-
E
Declaration
Swift
case e = "E"
-
E flat
Declaration
Swift
case eFlat = "Eb"
-
F
Declaration
Swift
case f = "F"
-
F sharp
Declaration
Swift
case fSharp = "F#"
-
G
Declaration
Swift
case g = "G"
-
G sharp
Declaration
Swift
case gSharp = "G#"
-
G flat
Declaration
Swift
case gFlat = "Gb"
-
A
Declaration
Swift
case a = "A"
-
A sharp
Declaration
Swift
case aSharp = "A#"
-
A flat
Declaration
Swift
case aFlat = "Ab"
-
B
Declaration
Swift
case b = "B"
-
B flat
Declaration
Swift
case bFlat = "Bb"
-
Implement Comparable
Declaration
Swift
public static func < (lhs: Self, rhs: Self) -> Bool
-
Contains text for accessibility text-to-speech and symbolized versions.
Declaration
Swift
public var display: (accessible: String, symbol: String)
-
Transpose a note
Declaration
Swift
mutating func transpose(transpose: Int, scale: Chord.Root)
Parameters
transpose
The transpose value
scale
The scale of the note