public struct Scale {
public let degrees: [Degree]
public let key: Note
public init(key: Note, degrees: [Degree])
public var notes: [Note] { get }
}
let ionianScale = Scale(
key: .C(.natural),
degrees: [
.one(.natural),
.two(.natural),
.three(.natural),
.four(.natural),
.five(.natural),
.six(.natural),
.seven(.natural),
]
)
print(ionianScale)
key: C
degrees: [1, 2, 3, 4, 5, 6, 7]
notes: [C, D, E, F, G, A, B]
let dorianScale = Scale(
key: .C(.natural),
degrees: [
.one(.natural),
.two(.natural),
.three(.flat),
.four(.natural),
.five(.natural),
.six(.natural),
.seven(.flat),
]
)
print(dorianScale)
key: C
degrees: [1, 2, ♭3, 4, 5, 6, ♭7]
notes: [C, D, D#, F, G, A, A#]
let a = Note.a(.natural)
let a_flat = Note.a(.flat)
let a_sharp = Note.a(.sharp)
or
let a = Note.a(.natural)
let a_flat = a.flat()
let a_sharp = a.sharp()
MusicalScaleKit is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "MusicalScaleKit"
muukii, [email protected]
MusicalScaleKit is available under the MIT license. See the LICENSE file for more info.