https://github.com/comorebi-notes/chord-translator
Translate any musical chord! (e.g. C => C,E,G)
https://github.com/comorebi-notes/chord-translator
Last synced: about 1 year ago
JSON representation
Translate any musical chord! (e.g. C => C,E,G)
- Host: GitHub
- URL: https://github.com/comorebi-notes/chord-translator
- Owner: comorebi-notes
- Created: 2017-12-20T07:10:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-29T12:17:22.000Z (over 7 years ago)
- Last Synced: 2025-04-22T10:45:19.678Z (about 1 year ago)
- Language: JavaScript
- Size: 186 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chord-translator
> `chord-translator` translate any musical chord !
## Install
```bash
npm i -S chord-translator
```
or
```bash
yarn add chord-translator
```
## Usage
```javascript
import chordTranslator from "chord-translator"
// chordTranslator(root, chordType, baseKey)
chordTranslator("C") // ["C3", "E3", "G3"]
chordTranslator("A", "add9") // ["A3", "Db4", "E4", "B4"]
chordTranslator("G", "m7", 5) // ["G5", "Bb5", "D6", "F6"]
// complex chords
chordTranslator("D", "M9(13)omit3") // ["D3", "A3", "Db4", "E4", "B4"]
chordTranslator("Ab", "7(b9,#11,b13)") // ["Ab3", "C4", "Eb4", "Gb4", "A4", "D5", "E5"]
// a variety of notation
chordTranslator("C", "M7") // ["C3", "E3", "G3", "B3", "E4"]
chordTranslator("C", "maj7") // ["C3", "E3", "G3", "B3", "E4"]
chordTranslator("C", "△7") // ["C3", "E3", "G3", "B3", "E4"]
```
## Others
This package used in [rechord](https://github.com/kero-uzura/rechord).
## License
MIT License