{"id":19655606,"url":"https://github.com/scribbletune/harmonics","last_synced_at":"2025-04-28T18:31:37.743Z","repository":{"id":42432386,"uuid":"344651056","full_name":"scribbletune/harmonics","owner":"scribbletune","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-23T20:48:05.000Z","size":517,"stargazers_count":15,"open_issues_count":1,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-28T22:38:14.283Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/scribbletune.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}},"created_at":"2021-03-05T00:47:03.000Z","updated_at":"2024-10-07T13:03:17.000Z","dependencies_parsed_at":"2022-08-19T13:11:02.017Z","dependency_job_id":null,"html_url":"https://github.com/scribbletune/harmonics","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribbletune%2Fharmonics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribbletune%2Fharmonics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribbletune%2Fharmonics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scribbletune%2Fharmonics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scribbletune","download_url":"https://codeload.github.com/scribbletune/harmonics/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224126367,"owners_count":17260023,"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":[],"created_at":"2024-11-11T15:22:28.341Z","updated_at":"2024-11-11T15:22:29.055Z","avatar_url":"https://github.com/scribbletune.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Harmonics\n\nTools and utilities for a generic representation of scales, chords, progressions etc. for use in music software, music related web \u0026 mobile apps, [scribbletune](https://scribbletune.com), [VCV Rack](https://vcvrack.com/) plugins and [Max for Live](https://www.ableton.com/en/live/max-for-live/) devices. Uses [tonal](https://github.com/tonaljs/tonal) for western classical and custom generators for other forms of music.\n\n## Install\n\n```bash\nnpm install harmonics\n```\n\n## Interface\n\nUse `harmonics` in your project\n\n```javascript\nconst harmonics = require('harmonics');\n```\n\nGet an `array` of all the scales available in harmonics (includes the one's from Tonal and the [Melakarta ragas](https://en.wikipedia.org/wiki/Melakarta)).\n\n```javascript\nharmonics.scales(); // ['ionian', 'dorian', 'lydian', '...', 'Kanakangi', 'Ratnangi', '...']\n```\n\nGet the notes of a scale as an `array`\n\n```javascript\nharmonics.scale('C4 major'); // ['C4', 'D4', 'E4', 'F4', 'G4', 'A4', 'B4']\n```\n\nScales available from Tonal are lower cased while ragas have their first letter capitalized.\n\n```javascript\nharmonics.scale('C4 Kanakangi'); // ['C4', 'Db4', 'D4', 'F4', 'G4', 'Ab4', 'A4']\n```\n\nGet an `array` of all the available chords (with numeric chords such as `4`, `5`, `7` etc exposed as `4th`, `5th`, `7th`)\n\n```javascript\nharmonics.chords(); // ['M', 'm', 'maj7', '4th']\n```\n\nGet the notes of a chord as an `array` (defaults to the 4th octave)\n\n```javascript\nharmonics.chord('C4 M'); // ['C4', 'E4', 'G4']\n```\n\nGet the notes of a chord as an `array` for a specific octave\n\n```javascript\nharmonics.chord('C5 M'); // ['C5', 'E5', 'G5']\n```\n\nGet the notes of an \"inline\" chord such as CM or Cmaj7 or Dbsus4_6 (here 6 is the octave). This is used in Scribbletune where you can define a bunch of notes and use chords in between, e.g 'C4 E4 Csus2 G4' (here Csus2 is \"inlined\" with C4, E4 and G4)\n\n```javascript\nharmonics.inlineChord('CM'); // ['C4', 'E4', 'G4']\nharmonics.inlineChord('CM_5'); // ['C5', 'E5', 'G5']\n```\n\nGet the indices of a scale/raga or bitmap\n\n```javascript\nharmonics.getIndicesFromScale('phrygian'); // [0, 1,  3,  5, 7, 8, 10, 12]\nharmonics.inlineChord('110010110011'); // [0, 1,  3,  5, 7, 8, 10, 12]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscribbletune%2Fharmonics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscribbletune%2Fharmonics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscribbletune%2Fharmonics/lists"}