Universal music theory library for iOS, iPadOS, macOS, tvOS and watchOS in Swift
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.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)
.Codable
.Double
type now, unnecessary props removed.Scale
.Interval
, Scale
, ScaleType
, Chord
, ChordType
ChrodType
s and ScaleType
s from intervals.Now you can calculate note durations with newly added Tempo, TimeSignature and NoteValue data structures. For example in a 4/4 time signature, 120BPM tempo, a quarter note would be 0.5 seconds. Also you can calculate hertz of a note for LFO speed.
ExpressibleByIntegerLiteral
protocol in Interval
enumReady to SwiftPackageManager with shared swift library
let cmin = Scale.minor(key: .c)
updated with
let min = ScaleType.min // enum
let cmin = Scale(type: min, key: .c) // struct
style for all Note, Scale and Chord types. We have NoteType, ScaleType and ChordType enums, key and octave agnostic. We have Note, Scale and Chord structs with keys and octaves as well as some handy operation functions.