blob: 4b17757d055c2b360a1748eecac4370fad816d50 [file] [log] [blame]
{
"name": "MusicTheorySwift",
"version": "0.1.1",
"summary": "A music theory library with `Note`, `Interval`, `Tone`, `Scale` and `Chord` representations in swift enums.",
"description": "MusicTheory\n===\n\nA music theory library with `Note`, `Interval`, `Scale` and `Chord` representations in swift enums.\n\nRequirements\n----\n* Swift 4+\n* iOS 8.0+\n* macOS 10.9+\n* tvOS 9.0+\n* watchOS 2.0+\n\nInstall\n----\n\n```\npod 'MusicTheorySwift'\n```\n\nUsage\n----\n\n`MusicTheory` adds a bunch of basic enums and structs that you can define pretty much any music related data. Most importants are `Note`, `Scale` and `Chord`.\n\n### `NoteType` and `Note`\n\n- All notes defined in `NoteType` enum.\n- You can create `Note`s with `NoteType`s and octaves.\n- Also, you can create `Note`s with MIDI note index.\n- Notes and NoteTypes are equatable, `+` and `-` custom operators defined for making calulations easier.\n- Also, there are other helper functions or properties like frequency of a note.\n\n``` swift\nlet d: NoteType = .d\nlet c = Note(type: .c, octave: 0)\n```\n\n### `Interval`\n\n- Intervals are halfsteps between notes.\n- They are `IntegerLiteral` and you can make add/subsctract them between themselves, notes or note types.\n- You can build scales or chords from intervals.\n- m2, M2, m3, M3, P4, d5, P5, m6, M6, m7, M7 and P8 are predefined intervals.\n\n### `ScaleType` and `Scale`\n\n- `ScaleType` enum defines a lot of readymade scales.\n- Also, you can create a custom scale type by `ScaleType.custom(intervals: [Interval], description: String)`\n- `Scale` defines a scale with a scale type and root key.\n- You can generate notes of scale in an octave range.\n- Also you can generate `HarmonicField` of a scale.\n- Harmonic field is all possible triad, tetrad or extended chords in a scale.\n\n``` swift\nlet c: NoteType = .c\nlet maj: ScaleType = .major\nlet cMaj = Scale(type: maj, key: c)\n```\n\n### `ChordType` and `Chord`\n\n- `ChordType` is a struct with `ChordPart`s which are building blocks of chords.\n- You can define any chord existing with `ChordType`.\n- Thirds, fifths, sixths, sevenths and extensions are parts of the `ChordType`.\n- Each of them also structs which conforms `ChordPart` protocol.\n- `Chord` defines chords with type and a root key.\n- You can generate notes of chord in any octave range.\n- You can generate inversions of any chord.\n\n``` swift\nlet m13 = ChordType(\nthird: .minor,\nseventh: .dominant,\nextensions: [\nChordExtensionType(type: .thirteenth)\n])\nlet cm13 = Chord(type: m13, key: .c)\n```\n\n### `Tempo` and `TimeSignature`\n\n- Tempo is a helper struct to define timings in your music app.\n- TimeSignature is number of beats in per measure and `NoteValue` of each beat.\n- You can calculate notes duration in any tempo by ther `NoteValue`.\n- Note value defines the note's duration in a beat. It could be whole note, half note, quarter note, 8th, 16th or 32nd note.\n\n### Documentation\n\n[Full documentation are here](https://cemolcay.github.io/MusicTheory/)\n\n### Unit Tests\n\nYou can find unit tests in `MusicTheoryTests` target.\nPress `⌘+U` for running tests.",
"homepage": "https://github.com/cemolcay/MusicTheory",
"license": "MIT",
"authors": {
"cemolcay": "ccemolcay@gmail.com"
},
"social_media_url": "http://twitter.com/cemolcay",
"platforms": {
"ios": "8.0",
"osx": "10.9",
"watchos": "2.0",
"tvos": "9.0"
},
"source": {
"git": "https://github.com/cemolcay/MusicTheory.git",
"tag": "0.1.1"
},
"source_files": "Source/*.{swift}",
"frameworks": "Foundation",
"requires_arc": true
}