{"id":18645232,"url":"https://github.com/danigb/music.note.transpose","last_synced_at":"2025-11-05T03:30:27.125Z","repository":{"id":66458349,"uuid":"44914460","full_name":"danigb/music.note.transpose","owner":"danigb","description":"Note transposition fast and easy","archived":false,"fork":false,"pushed_at":"2015-10-28T10:24:28.000Z","size":136,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T11:34:50.684Z","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/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-10-25T14:54:22.000Z","updated_at":"2018-11-09T16:52:16.000Z","dependencies_parsed_at":"2023-02-20T20:00:24.961Z","dependency_job_id":null,"html_url":"https://github.com/danigb/music.note.transpose","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fmusic.note.transpose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fmusic.note.transpose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fmusic.note.transpose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danigb%2Fmusic.note.transpose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danigb","download_url":"https://codeload.github.com/danigb/music.note.transpose/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239449552,"owners_count":19640532,"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-07T06:15:08.159Z","updated_at":"2025-11-05T03:30:27.088Z","avatar_url":"https://github.com/danigb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# music.note.transpose\n\n[![Build Status](https://travis-ci.org/danigb/music.note.transpose.svg?branch=master)](https://travis-ci.org/danigb/music.note.transpose)\n[![Test Coverage](https://codeclimate.com/github/danigb/music.note.transpose/badges/coverage.svg)](https://codeclimate.com/github/danigb/music.note.transpose/coverage)\n[![Code Climate](https://codeclimate.com/github/danigb/music.note.transpose/badges/gpa.svg)](https://codeclimate.com/github/danigb/music.note.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/music.note.transpose.svg)](https://www.npmjs.com/package/music.note.transpose)\n[![license](https://img.shields.io/npm/l/music.note.transpose.svg)](https://www.npmjs.com/package/music.note.transpose)\n[![music.kit](https://img.shields.io/badge/music-kit-yellow.svg)](https://www.npmjs.com/package/music.kit)\n\nSimple and fast pitch transposition:\n\n```js\nvar transpose = require('music.note.transpose')\ntranspose('E2', '2M') // =\u003e 'F#2'\ntranspose('F4', '3m') // =\u003e 'Ab4'\n```\n\nThis is part of [music.kit](https://www.npmjs.com/package/music.kit)\n\n## Installation\n\nVia npm module: `npm i --save music.note.transpose` or the [browser ready distribution file]()\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```\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#### Using different interval or pitch representations\n\nThis library can work with [pitches or intervals expressed as arrays](https://github.com/danigb/a-pitch):\n\n```js\ntranspose([0, 1, 3], [2, 0, 0]) // =\u003e [3, 1, 3]\n// is the same as: transpose('C#3', '3M') =\u003e 'E#3'\n```\n\n#### More...\n\nSee [music.kit](https://www.npmjs.com/package/music.kit)\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Fmusic.note.transpose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanigb%2Fmusic.note.transpose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanigb%2Fmusic.note.transpose/lists"}