{"id":20631077,"url":"https://github.com/zsnout/musicnotes-api","last_synced_at":"2025-06-24T10:38:00.793Z","repository":{"id":104247483,"uuid":"264444502","full_name":"zSnout/MusicNotes-API","owner":"zSnout","description":"This repository contains the source code for the MusicNotes API.","archived":false,"fork":false,"pushed_at":"2021-05-29T15:46:30.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T18:33:22.042Z","etag":null,"topics":["api","augmented-scales","common-scales","diminished-scales","music-library","musicnotes-api","scale","zsnout"],"latest_commit_sha":null,"homepage":"https://github.com/zSnout/MusicNotes-API","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zSnout.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-05-16T13:34:36.000Z","updated_at":"2025-02-10T07:15:14.000Z","dependencies_parsed_at":"2023-03-13T21:30:27.477Z","dependency_job_id":null,"html_url":"https://github.com/zSnout/MusicNotes-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zSnout/MusicNotes-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zSnout%2FMusicNotes-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zSnout%2FMusicNotes-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zSnout%2FMusicNotes-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zSnout%2FMusicNotes-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zSnout","download_url":"https://codeload.github.com/zSnout/MusicNotes-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zSnout%2FMusicNotes-API/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261653202,"owners_count":23190408,"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":["api","augmented-scales","common-scales","diminished-scales","music-library","musicnotes-api","scale","zsnout"],"created_at":"2024-11-16T14:10:46.503Z","updated_at":"2025-06-24T10:38:00.718Z","avatar_url":"https://github.com/zSnout.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MusicNotes API\n\nzSnout's MusicNotes API is an easy way to make musical scales and chords without having to write much code.\n\nReady to start using MusicNotes API? Let's get started!\n\n## We Support...\n\nCurrently MusicNotes API in only written in PHP. If you would like to help add support in other languages, please create a pull request.\n\n## Including The MusicNotes API\n\nTo include MusicNotes, you must download and serve MusicNotes yourself. Use [this file](https://github.com/zSnout/MusicNotes-API/blob/master/musicnotes.php).\n\nWhen you send a request, it should look something like this:\n\n```\nhttp://yourdomain.com/path/to/file?(query)\n```\n\nRemember, your query should be a query written in the format described below, or several queries joined together with `,`, `?`, `\u0026`, or `:`.\n\n## Writing Queries\n\nMusicNotes queries are meant to be simple, easy-to-understand things. Here's how to write them.\n\nMusicNotes queries come in three parts: the base note (the base note of the scale), the scale type (major, minor, augmented, diminished), and the note number (we're getting the nth note in the scale). These three parts are conbined into one to make a query.\n\nExamples: `Csharp`, `Amin3`\n\n#### The Base Note\n\nA base note consists of two parts: the note and a modifier. For example, in this base note: `Csharp`, the note is `C` and the modifier is `sharp`.\n\nThe note can be `A`, `B`, `C`, `D`, `E`, `F`, or `G`, and the modifier can be `flat`, `sharp`, or omitted. You can also use `b` as an alias for `flat`.\n\nTo get our base note, simply stick the note and the modifier together, like in these examples: `A` (note A, modifier omitted), `Bb` (note B, modifier b).\n\nAlways make sure to capitalize your note so that it gets interpreted correctly.\n\nHere's a summary of what we've written here in diagram form:\n\n![](/assets/base-note.svg)\n\n#### The Scale Type\n\nThe scale type tells the interpreter which note to output. There are several different types of scales, but MusicNotes supports two common scales, and two less common scales.\n\nThese are the major scale, the minor scale, the augmented scale, and the diminished scale.\n\nTo specify the scale type, simply write `maj` for major, `min` for minor, `aug` for augmented, and `dim` for diminished. You can also omit it to specify major.\n\nHere's a diagram of the above conditions:\n\n![](/assets/scale-type.svg)\n\n#### The Note Number\n\nThe note number can take 4 different forms. Here they are:\n\n###### Leaving it Empty\n\nIf you omit the note number, the query will select the entire scale. Remember that major and minor sclaes are 8 notes long, augmented scales are 7 notes long, and diminished scales are 9 notes long.\n\nBut what if we only want to get the third note?\n\n###### Gettign a Specific Note Number\n\nThe last part of a query is the note number. Without it, an entire scale is selected, which may not be what you wanted to get.\n\nThe note number can be anything from `0` to `9`, where notes `0` and `1` are equivalent.\n\nFor example, we could write `4` or `6`.\n\nBut what if we want the first, third, fifth, seventh, and ninth notes in a scale?\n\n###### Getting Several Numbers with Plus Notation\n\nAs we learned at the beginning, we can string several queries together like this: `Cmin1,Cmin3,Cmin5,Cmin7,Cmin9`.\n\nBut that's long. What if we wanted to make it shorter? Enter plus notation!\n\nPlus notation turns this: `Cmin1,Cmin3,Cmin5,Cmin7,Cmin9` into this: `Cmin1+3+5+7+9`.\n\nSee what we did here? Instead of writing each note number in an individual query, we put them together with `+` signs!\n\nPlus notation is especially useful in this case: `Asharpdim1,Asharpdim3,Asharpdim5,Asharpdim7,Asharpdim9` = `Asharpdim1+3+5+7+9`.\n\nExamples: `D1+3+5` (`D1,D3,D5`), `Ab3+5+7` (`Ab3,Ab5,Ab7`).\n\nBut what if we want to get `Bflataug1+2+3+4+5+6+7+8+9`? We can't write `Bflataug`, since that only gets notes 1 through 7. However, we can use ...\n\n###### Getting a Range of Number with Dash Notation\n\nSay we want to get `Bflataug1+2+3+4+5+6+7+8+9`. Dash notation is useful for this, because it allows us to shorten the ending `1+2+3+4+5+6+7+8+9` into `1-9`.\n\nSee what we did here? We took our number set `1+2+3+4+5+6+7+8+9` and (because it's also the range of numbers from 1 to 9) turned it into the range `1-9`.\n\nExamples: `B1-5` (`B1+2+3+4+5`), `Cmin2-6` (`Cmin2,Cmin3,Cmin4,Cmin5,Cmin6`).\n\nHere's the above in a diagram:\n\n![](/assets/note-number.svg)\n\n\u003cbr\u003e\n\nHere's a diagram of a query/queries:\n\n![](/assets/query.svg)\n\n\u003cbr\u003e\n\u003cbr\u003e\n\nTo make our query, we combine these three parts into one. Here are some examples:\n\n - `B` (B major scale)\n - `Dmin` (D minor scale)\n - `E4` (fourth note in E major scale)\n \n ## Hope you have fun with MusicNotes!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsnout%2Fmusicnotes-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzsnout%2Fmusicnotes-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzsnout%2Fmusicnotes-api/lists"}