{"id":15696047,"url":"https://github.com/ddycai/chord-transposer","last_synced_at":"2025-10-24T00:48:45.275Z","repository":{"id":11010241,"uuid":"67983845","full_name":"ddycai/chord-transposer","owner":"ddycai","description":"Node library for transposing musical chords within text.","archived":false,"fork":false,"pushed_at":"2025-03-11T22:25:45.000Z","size":1172,"stargazers_count":59,"open_issues_count":11,"forks_count":23,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-26T11:10:04.152Z","etag":null,"topics":["chords","music-notation","npm-package"],"latest_commit_sha":null,"homepage":"https://ddycai.github.io/chord-transposer/","language":"TypeScript","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/ddycai.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":"2016-09-12T06:56:59.000Z","updated_at":"2025-02-27T08:46:28.000Z","dependencies_parsed_at":"2023-08-20T05:57:19.715Z","dependency_job_id":"33a3bc0f-88b3-491c-8e44-549aeb071a5c","html_url":"https://github.com/ddycai/chord-transposer","commit_stats":{"total_commits":76,"total_committers":9,"mean_commits":8.444444444444445,"dds":0.631578947368421,"last_synced_commit":"d1852e7f7c78f35e728ee06515c74afc1ecb7efa"},"previous_names":["ddycai/chord-transposer-lib","ddycai/chord-transposer"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddycai%2Fchord-transposer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddycai%2Fchord-transposer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddycai%2Fchord-transposer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ddycai%2Fchord-transposer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ddycai","download_url":"https://codeload.github.com/ddycai/chord-transposer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252847489,"owners_count":21813453,"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":["chords","music-notation","npm-package"],"created_at":"2024-10-03T19:06:48.483Z","updated_at":"2025-10-24T00:48:45.198Z","avatar_url":"https://github.com/ddycai.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Chord Transposer\n========\n\nJavascript (Typescript) library for transposing musical chords within text.\n\n## Demo\n\nWeb app: http://ddycai.github.io/chord-transposer\n\nThe source code for the web app demo is on the `app` branch: https://github.com/ddycai/chord-transposer/tree/app\n\n## Usage\n\nInstall via npm:\n\n```\nnpm install chord-transposer\n```\n\nImport the package using your preferred import syntax:\n\n```javascript\nconst Transposer = require('chord-transposer');\n\nimport * as Transposer from 'chord-transposer';\n\nimport { transpose, Chord, KeySignatures } from 'chord-transposer';\n```\n\n## Transposing\n\nTo a certain key signature:\n\n```javascript\n\u003e Transposer.transpose(\n\"G        C           Am7            C        D7       G\\n\" +\n\"Saying I love you is not the words I want to hear from you\").toKey('F').toString()\n'F        Bb          Gm7            Bb       C7       F\\n' +\n'Saying I love you is not the words I want to hear from you'\n```\n\n`up` or `down` any number of semitones:\n\n```javascript\n// Up 7 semitones.\n\u003e Transposer.transpose(\n\"G        C           Am7            C        D7       G\\n\" +\n\"Saying I love you is not the words I want to hear from you\").up(7).toString()\n'D        G           Em7            G        A7       D\\n' +\n'Saying I love you is not the words I want to hear from you'\n\n// Down 4 semitones.\n\u003e Transposer.transpose(\n\"G        C           Am7            C        D7       G\\n\" +\n\"Saying I love you is not the words I want to hear from you\").down(4).toString()\n'Eb       Ab          Fm7            Ab       Bb7      Eb\\n' +\n'Saying I love you is not the words I want to hear from you'\n```\n\n### Auto Key Signature\n\nIf the key signature is not specified, the key will be inferred from the first\nchord.\n\n```javascript\n\u003e Transposer.transpose('F  C7 Bb').toKey('D').toString()\n'D  A7 G'\n\n\u003e Transposer.transpose('Fm  C Ab').toKey('Dm').toString()\n'Dm  A F'\n```\n\n### Supported Chords\n\n```javascript\n\u003e Transposer.transpose('A Bmaj CM Dm/F E7/G# Gsus4').toKey('F').toString()\n'F Gmaj AbM Bbm/Db C7/E  Ebsus4'\n\n\u003e Transposer.transpose('Abm Bbmin C- Ddim Ebaug F+ Gb+5').toKey('Dm').toString()\n'Dm  Emin  Gb- Abdim Aaug  Cb+ C+5'\n```\n\n## Parsing\n\nWhen text is passed into `transpose`, it is parsed into `Token[][]` where\n`Token = Chord | string`. You can access these through `tokens` to parse\nhowever you like:\n\n```javascript\n\u003e Transposer.transpose('C  G  Am  G7/B  C    F  C   F   G7\\n'+\n                       'O Canada  Our home and native land').tokens\n[\n  [\n    Chord { root: 'C', suffix: '', bass: undefined },\n    '  ',\n    Chord { root: 'G', suffix: '', bass: undefined },\n    '  ',\n    Chord { root: 'A', suffix: 'm', bass: undefined },\n    '  ',\n    Chord { root: 'G', suffix: '7', bass: 'B' },\n    '  ',\n    Chord { root: 'C', suffix: '', bass: undefined },\n    '    ',\n    Chord { root: 'F', suffix: '', bass: undefined },\n    '  ',\n    Chord { root: 'C', suffix: '', bass: undefined },\n    '   ',\n    Chord { root: 'F', suffix: '', bass: undefined },\n    '   ',\n    Chord { root: 'G', suffix: '7', bass: undefined }\n  ],\n  [ 'O Canada  Our home and native land' ]\n]\n```\n\nYou can also parse individual chords:\n\n```javascript\n\u003e const Transposer = require('chord-transposer')\n\u003e Transposer.Chord.parse('Cm7/E')\nChord { root: 'C', suffix: 'm7', bass: 'E' }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddycai%2Fchord-transposer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fddycai%2Fchord-transposer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fddycai%2Fchord-transposer/lists"}