UNPKG

1.4 kBtext/x-handlebars-templateView Raw
1# TwelveTetFretboard
2
3> TwelveTetFretboard is a small fretboard utility library for Javascript. It helps you manipulate pitches on a fretboard.
4
5Please, refer to the [Installation](#installation), [Usage](#usage) and [API](#api) sections for more information.
6
7## Installation <a name="installation"></a>
8
9Install the latest stable version of TwelveTetFretboard using [npm](https://www.npmjs.com/):
10
11```bash
12npm install twelvetet-fretboard twelvetet
13```
14
15You can also [access the files on unpkg.com](https://unpkg.com/twelvetet-fretboard/).
16
17You can use TwelveTetFretboard with module bundlers.
18
19The [npm package](https://www.npmjs.com/package/twelvetet-fretboard) includes precompiled production and development [UMD](https://github.com/umdjs/umd) builds in the `dist/` folder. They can be used without a bundler.
20
21The UMD builds make TwelveTetFretboard available as `window.TwelveTetFretboard` global variable.
22
23TwelveTetFretboard works in [any modern browser](http://caniuse.com/#feat=es5) and Node.js.
24
25## Usage <a name="usage"></a>
26
27```Javascript
28import Fretboard from 'twelvetet-fretboard'
29
30const tuning = ['E2', 'A2', 'D3', 'G3', 'B3', 'E4'] // standard guitar tuning
31const numFrets = 12
32const fretboard = new Fretboard(tuning, numFrets)
33
34console.log(fretboard.at(0, 0).toString()) // E4
35```
36
37## API <a name="api"></a>
38
39{{>main}}
40
41## License
42
43This project is [MIT-licensed](LICENSE)
44
\No newline at end of file