{"id":18645185,"url":"https://github.com/danigb/tonal.transpose","last_synced_at":"2026-01-23T09:34:37.683Z","repository":{"id":66458401,"uuid":"46741420","full_name":"danigb/tonal.transpose","owner":"danigb","description":"Music note transposition","archived":false,"fork":false,"pushed_at":"2015-12-01T21:21:11.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-17T18:08:15.244Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","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/danigb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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":"2015-11-23T19:00:35.000Z","updated_at":"2015-11-30T01:12:28.000Z","dependencies_parsed_at":"2023-02-20T20:00:28.663Z","dependency_job_id":null,"html_url":"https://github.com/danigb/tonal.transpose","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/danigb/tonal.transpose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Ftonal.transpose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Ftonal.transpose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Ftonal.transpose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Ftonal.transpose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danigb","download_url":"https://codeload.github.com/danigb/tonal.transpose/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Ftonal.transpose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28686568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07T06:14:58.809Z","updated_at":"2026-01-23T09:34:37.632Z","avatar_url":"https://github.com/danigb.png","language":"HTML","readme":"# tonal.transpose\n\n[![Build Status](https://travis-ci.org/danigb/tonal.svg?branch=master)](https://travis-ci.org/danigb/tonal.transpose)\n[![Code Climate](https://codeclimate.com/github/danigb/tonal.transpose/badges/gpa.svg)](https://codeclimate.com/github/danigb/tonal.transpose)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)\n[![npm version](https://img.shields.io/npm/v/tonal.transpose.svg)](https://www.npmjs.com/package/tonal.transpose)\n[![license](https://img.shields.io/npm/l/tonal.transpose.svg)](https://www.npmjs.com/package/tonal.transpose)\n[![tonal](https://img.shields.io/badge/tonal-transpose-yellow.svg)](https://www.npmjs.com/package/tonal)\n\n\n`tonal.transpose` is a [compact](https://rawgit.com/danigb/tonal.transpose/master/dist/disc.html) function to transpose notes:\n\n```js\nvar transpose = require('tonal.transpose')\ntranspose('C3', '3m') // =\u003e 'Eb3'\n```\n\nIt's part of [tonal](https://www.npmjs.com/package/tonal)\n\n## Install\n\nVia npm: `npm i --save tonal.transpose` and require the function. Use browserify or webpack to create a browser ready distribution.\n\nOr use the [distribution file](https://raw.githubusercontent.com/danigb/tonal.transpose/master/dist/tonal.transpose.min.js) (adds `transpose` function to window globals):\n\n```html\n\u003cscript src=\"tonal.transpose.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003econsole.log(transpose('C3', '3m'))\u003c/script\u003e\n```\n\n## Usage\n\n#### Note transposition\n\nThe simplest usage is with a note name (pitch) and interval (the order doesn't matter):\n\n```js\ntranspose('C2', '4A') // =\u003e 'F#2'\ntranspose('4A', 'C2') // =\u003e 'F#2'\n```\n\n#### Pitch class transposition\n\nYou can transpose pitch classes (note names without octaves), and the returned value will be a pitch class:\n\n```js\ntranpose('A', '3M') // =\u003e 'C#'\ntranpose('A5', '3M') // =\u003e 'C#5'\n```\n\n#### Add intervals\n\nIf you need it you can transpose an interval:\n\n```js\ntranspose('3M', '3M') // =\u003e '5A'\n```\n\n#### Transposers\n\nAlso, you can partially apply the function to get a transposer:\n\n```js\nvar major3th = transpose('3M')\nmajor3th('D') // =\u003e 'F#'\n```\n\n#### Map arrays\n\nPartially applied transposers allows to work with arrays seamlessly:\n\n```js\n['C', 'D', 'E', 'F', 'G'].map(transpose('3M')) // =\u003e ['E', 'F#', 'G#', 'A', 'B']\n['1P', '3m', '5P'].map(transpose('C')) // =\u003e ['C', 'Eb', 'G']\n```\n\n#### More...\n\nSee [tonal](https://www.npmjs.com/package/tonal)\n\n## License\n\nMIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Ftonal.transpose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanigb%2Ftonal.transpose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Ftonal.transpose/lists"}