frettable

1.1.7 • Public • Published

frettable

determine if a set of notes can be physically fretted on guitar

Installation

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."

const frettable = require('frettable');
let chord;

chord = [-1, -1, 0, 2, 3, 2]; // D chord
console.log(frettable(chord)); // true

chord = [1, 2, 3, 4, 5, 6];
console.log(frettable(chord)); // false - this chord is impossible to fret

Readme

Keywords

Package Sidebar

Install

npm i frettable

Weekly Downloads

0

Version

1.1.7

License

MIT

Unpacked Size

5.55 kB

Total Files

7

Last publish

Collaborators

  • yomed