{"id":23807118,"url":"https://github.com/brettbuddin/musictheory","last_synced_at":"2025-04-15T23:53:13.181Z","repository":{"id":36907741,"uuid":"41214769","full_name":"brettbuddin/musictheory","owner":"brettbuddin","description":"🎵 Music theory concepts in Go.","archived":false,"fork":false,"pushed_at":"2024-07-24T02:42:24.000Z","size":94,"stargazers_count":77,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T03:03:19.716Z","etag":null,"topics":["audio","go","midi","music","music-theory"],"latest_commit_sha":null,"homepage":"","language":"Go","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/brettbuddin.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":"2015-08-22T16:05:04.000Z","updated_at":"2025-03-18T08:18:24.000Z","dependencies_parsed_at":"2025-01-01T23:27:54.411Z","dependency_job_id":"68fbfc9f-4cbe-4d7b-871a-2f3e690c723d","html_url":"https://github.com/brettbuddin/musictheory","commit_stats":null,"previous_names":["brettbuddin/mt"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmusictheory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmusictheory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmusictheory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brettbuddin%2Fmusictheory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brettbuddin","download_url":"https://codeload.github.com/brettbuddin/musictheory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249173061,"owners_count":21224481,"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":["audio","go","midi","music","music-theory"],"created_at":"2025-01-01T23:27:45.434Z","updated_at":"2025-04-15T23:53:13.162Z","avatar_url":"https://github.com/brettbuddin.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Music Theory\n\n[![Build Status](https://travis-ci.org/brettbuddin/musictheory.svg?branch=master)](https://travis-ci.org/brettbuddin/musictheory)\n[![GoDoc](https://godoc.org/github.com/brettbuddin/musictheory?status.svg)](https://godoc.org/github.com/brettbuddin/musictheory)\n\nExplorations in music theory.\n\n## Usage\n\n```go\npackage main\n\nimport (\n    mt \"github.com/brettbuddin/musictheory\"\n    \"github.com/brettbuddin/musictheory/intervals\"\n)\n\nfunc main() {\n    root := mt.NewPitch(mt.C, mt.Natural, 4)\n\n    root.Name(mt.AscNames) // C4\n    root.Freq()            // 261.625565 (Hz)\n    root.MIDI()            // 72\n\n    P5 := mt.Perfect(5)   // Perfect 5th\n    A4 := mt.Augmented(4) // Augmented 4th\n\n    root.Transpose(P5).Name(mt.AscNames)          // G4\n    root.Transpose(A4).Name(mt.AscNames)          // F#4\n    root.Transpose(P5.Negate()).Name(mt.AscNames) // F3\n\n    mt.NewScale(root, intervals.Dorian, 1)\n    // [C4, D4, Eb4, F4, G4, A4, Bb4]\n\n    mt.NewScale(root, intervals.Mixolydian, 2)\n    // [C4, D4, E4, F4, G4, A4, Bb4, C5, D5, E5, F5, G5, A5, Bb5]\n\n    rootPosition := mt.NewChord(root, intervals.DiminishedSeventh)\n    // [C4, Eb4, Gb4, A4]\n\n    firstInversion := rootPosition.Invert(1)\n    // [C5, Eb4, Gb4, A4]\n\n    secondInversion := rootPosition.Invert(2)\n    // [C5, Eb5, Gb4, A4]\n\n    note := mt.NewNote(root, mt.D16) // C4 sixteenth note\n    note.Time(mt.D4, 120)            // 125ms (quarter note getting the beat at 120 BPM)\n}\n```\n\n楽しみます！\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettbuddin%2Fmusictheory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrettbuddin%2Fmusictheory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrettbuddin%2Fmusictheory/lists"}