Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adriano-di-giovanni/twelvetet-spn
Scientific pitch notation parser/formatter for Node.js and the browser.
https://github.com/adriano-di-giovanni/twelvetet-spn
Last synced: 1 day ago
JSON representation
Scientific pitch notation parser/formatter for Node.js and the browser.
- Host: GitHub
- URL: https://github.com/adriano-di-giovanni/twelvetet-spn
- Owner: adriano-di-giovanni
- License: mit
- Created: 2018-02-25T12:21:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-03-01T11:00:38.000Z (over 6 years ago)
- Last Synced: 2024-10-05T20:34:06.445Z (about 1 month ago)
- Language: JavaScript
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.hbs
- License: LICENSE
Awesome Lists containing this project
README
# twelvetet-spn
> Scientific pitch notation parser/formatter for Node.js and the browser.
## Installation
Install the latest stable version of `twelvetet-spn` using [npm](https://www.npmjs.com/):
```bash
npm install twelvetet-spn
```You can also [access the files on unpkg.com](https://unpkg.com/twelvetet-spn/).
You can use `twelvetet-spn` with module bundlers.
The `twelvetet-spn` [npm package](https://www.npmjs.com/package/twelvetet-spn) includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the `dist/` folder. They can be used without a bundler.
The UMD builds make `twelvetet-spn` available as `window.TwelveTetSPN` global variable.
`twelvetet-spn` works in [any modern browser](http://caniuse.com/#feat=es5) and Node.js.
## Usage
```javascript
import { format, parse } from 'twelvetet-spn'parse('A4') // [9, 4]
// NOTE: `format()` always returns an array of five elements
// ordered as follows: `[, , , , ]`.
// An element is `null` when there is no corresponding enharmonic equivalent.
format([9, 4]) // ['Gx4', null, 'A4', null, 'Bbb4']```
## API
{{#module name="twelvetet-spn"}}
{{>body~}}
{{>member-index~}}
{{>separator~}}
{{>members~}}
{{/module}}## License
This project is [MIT-licensed](LICENSE)