-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,28 @@ | ||
# frettable | ||
determines if a chord configuration is physically frettable | ||
determine if a set of notes can be physically fretted on guitar | ||
|
||
## Installation | ||
|
||
```bash | ||
npm install frettable --save | ||
``` | ||
|
||
|
||
## Usage | ||
|
||
Frettable takes an array of notes, each representing the fret on a standard 6-string guitar. | ||
An open note is represented as 0, and a muted note as -1. An open D chord would look like `[-1, -1, 0, 2, 3, 2]` | ||
|
||
Based on the possible fingerings, frettable will determine whether or not the chord is "frettable." | ||
|
||
```js | ||
var frettable = require('frettable'); | ||
var chord; | ||
|
||
chord = [-1, -1, 0, 2, 3, 2]; | ||
console.log(frettable(chord)); // true | ||
|
||
chord = [1, 2, 3, 4, 5, 6]; | ||
console.log(frettable(chord)); // false - this chord is impossible to fret | ||
|
||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters