North Pittsburgh Meatpackers
Have opinions about JavaScript? We want to hear them. Take the 2018 JavaScript Ecosystem Survey »

guitar-utils

1.4.0 • Public • Published

guitar-utils

Utilities for guitar fretboard and audio

Example usage

 
var gUtils = require('guitar-utils');
 
var p = gUtils.get_pitch_at(5, 0); // p will be 'A'
var pn = gUtils.get_pitch_number(5, 0); // pn will be 2
var next_p = gUtils.get_next_pitch('C'); // next_p will be 'D'
var prev_p = gUtils.get_prev_pitch('G'); // prev_p will be 'F'
var prev_p = gUtils.get_prev_pitch('F', 1); // prev_p will be 'E'
 

get_pitch_at and get_pitch_number take two arguments. First is the string (1-6), second is the fret (0-24). Fret 0 means open string :)

get_next_pitch and get_prev_pitch take two arguments. First is the pitch, second is the number of half steps (default is 2)

Installation

npm install guitar-utils

Keywords

install

npm i guitar-utils

Downloadsweekly downloads

31

version

1.4.0

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability