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