https://github.com/AudioKit/Tonic/issues/16
Swift library for music theory, currently focused on chords/harmony.
Tonic answers musical questions, such as:
What’s the note for this pitch in this key?
Note(pitch: Pitch(midiNoteNumber), key: .Bb)
What’s the name of a chord?
Chord(notes: notes).description
What chords are in this key?
Key.Cm.chords
What chords in this key contain this note?
Key.C.chords.filter { $0.noteClasses.contains(.C) }
What notes do these keys have in common?
Key.C.noteSet.intersection(Key.Cm.noteSet)
What notes don’t these keys have in common?
Key.C.noteSet.symmetricDifference(Key.Cm.noteSet)
These questions are all tested in our unit tests explicitly.
Pitch
UInt8
The documentation is host on the AudioKit.io Website. The package includes a demo project as well.
Install using Swift Package Manager.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Tonic
Swift library for music theory, currently focused on chords/harmony.
Tonic answers musical questions, such as:
What’s the note for this pitch in this key?
Note(pitch: Pitch(midiNoteNumber), key: .Bb)What’s the name of a chord?
Chord(notes: notes).descriptionWhat chords are in this key?
Key.Cm.chordsWhat chords in this key contain this note?
Key.C.chords.filter { $0.noteClasses.contains(.C) }What notes do these keys have in common?
Key.C.noteSet.intersection(Key.Cm.noteSet)What notes don’t these keys have in common?
Key.C.noteSet.symmetricDifference(Key.Cm.noteSet)These questions are all tested in our unit tests explicitly.
Goals
Pitchinstead ofUInt8).Documentation
The documentation is host on the AudioKit.io Website. The package includes a demo project as well.
Install
Install using Swift Package Manager.