{"id":16009585,"url":"https://github.com/fwcd/swift-music-theory","last_synced_at":"2025-08-12T01:31:27.092Z","repository":{"id":58075810,"uuid":"296896361","full_name":"fwcd/swift-music-theory","owner":"fwcd","description":"Music theory library written in pure Swift","archived":false,"fork":false,"pushed_at":"2024-10-16T00:27:45.000Z","size":99,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-12-01T14:11:50.839Z","etag":null,"topics":["linux","music","music-theory","swift"],"latest_commit_sha":null,"homepage":"https://fwcd.github.io/swift-music-theory/documentation/musictheory","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fwcd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-19T15:21:25.000Z","updated_at":"2024-11-26T13:20:41.000Z","dependencies_parsed_at":"2024-10-27T15:14:18.043Z","dependency_job_id":"01a1c044-532f-4ad8-b2c7-b1c1ca82ba77","html_url":"https://github.com/fwcd/swift-music-theory","commit_stats":{"total_commits":98,"total_committers":3,"mean_commits":"32.666666666666664","dds":0.05102040816326525,"last_synced_commit":"0102d2e45295f2481fa487842e84ca27cf031cf8"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-music-theory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-music-theory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-music-theory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fwcd%2Fswift-music-theory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fwcd","download_url":"https://codeload.github.com/fwcd/swift-music-theory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229625048,"owners_count":18100641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","music","music-theory","swift"],"created_at":"2024-10-08T13:03:02.296Z","updated_at":"2024-12-13T22:35:10.911Z","avatar_url":"https://github.com/fwcd.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Music Theory Library for Swift\n\n[![Build](https://github.com/fwcd/swift-music-theory/actions/workflows/build.yml/badge.svg)](https://github.com/fwcd/swift-music-theory/actions/workflows/build.yml)\n[![Docs](https://github.com/fwcd/swift-music-theory/actions/workflows/docs.yml/badge.svg)](https://fwcd.github.io/swift-music-theory/documentation/musictheory)\n\nA minimal library for Western music theory in pure Swift, defining notes, scales, chords, intervals, progressions and more.\n\nSince no external dependencies are needed, it runs on Linux, macOS and any other platform supporting Swift 5.7+, including the browser with [SwiftWasm](https://github.com/swiftwasm).\n\n## Examples\n\n```swift\n// Creating (octaved) notes\nNote(.c, 3)             // -\u003e C3\nNote(.d.flat, 2)        // -\u003e Db2\n\n// Applying diatonic intervals\nNote(.c, 3) + .majorThird // -\u003e E3\nNote(.d, 2) + .octave     // -\u003e D3\n\n// Applying chromatic intervals\nNote(.f, 2) + .semitone\nNote(.g.sharp, 0) + .semitones(3)\n\n// Creating scales\nMajorScale(key: Note(.e, 2)).notes       // -\u003e [E2, F#2, G#2, A2, B2, C#3, D#3]\nMinorScale(key: Note(.c, 1)).notes       // -\u003e [C1, D1, Eb1, F1, G1, Ab1, Bb1]\nMinorBluesScale(key: Note(.g, 0)).notes  // -\u003e [G0, Bb0, C1, Db1, D1, F1]\n```\n\nTo experiment with the library yourself, simply run `swift run --repl` to open an interactive shell and enter\n\n```swift\nimport MusicTheory\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fswift-music-theory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffwcd%2Fswift-music-theory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffwcd%2Fswift-music-theory/lists"}