Universal music theory library for iOS, iPadOS, macOS, tvOS and watchOS in Swift
110 scales in total.
Added harmonic functions support! Now you can create harmonic functions from a scale and get possible directions for a key according to its harmonic function in the scale.
Represents a custom chord type for the chords that can not be represented by the current data structures. Can be initialized with the custom intervals.
struct
instead of enum
You can create chord progressions now. It supports custom ones with Codable
protocol, that you can store and use later.
let progression = ChordProgression.i_ii_vi_iv
let cSharpHarmonicMinorTriadsProgression = progression.chords(
for: cSharpHarmonicMinor,
harmonicField: .triad,
inversion: 0)
You can create Pitch
es and Key
s from string now.
let p: Pitch = "c#2"
let k: Key = "a#"
Note
and NoteType
structs removed.Key
instead of NoteType
with a KeyType
and Accidental
.Pitch
instead of Note
with a Key
and octave (Int).Scale
and Chord
structs notes(..)
functions renamed pitches(...)
and they are returning [Pitch]
instead of [Note]
.Scale
and Chord
structs noteTypes
property renamed keys
and it returns [Key]
instead of [NoteType]
.Accidental
struct added. You can define accidents like sharp, flat, doubleSharp or more spesific like .sharps(amount: 3)
.Interval
struct rewritten. Now it is a struct instead of an enum. But all important intervals as in old version added as static
variables and it probably won't break anything.