0.69.9 • Published 7 years ago

tonal-fretboard v0.69.9

Weekly downloads
3
License
MIT
Repository
-
Last release
7 years ago

tonal-fretboard npm version

tonal

tonal-fretboard is a module to represent notes in a fretboard.

This is part of tonal music theory library.

You can install via npm: npm i --save tonal-fretboard

API Reference

tuning(name) ⇒ Array

Given a tuning name, returns the notes of the strings in the open position

Kind: global function
Returns: Array - the string notes or null if not valid tuning name

ParamTypeDescription
nameStringthe tuning name

Example

var fret = require('tonal-fretboard')
fret.tuning('guitar') // => [ 'E2', 'A2', 'D3', 'G3', 'B3', 'E4' ]
fret.tuning('charango') // => [ 'G4', 'G4', 'C5', 'C5', 'E5', 'E4', 'A4', 'A4', 'E5', 'E5' ]

simpleTuning(name) ⇒ Array

Given a tuning name returns the notes of the strings in open position as pitch classes removing doubled strings.

Kind: global function
Returns: Array - the string notes as pitch classes

ParamTypeDescription
nameStringthe tuning name or notes of the strings in open position

Example

fret.simpleTuning('guitar') => [ 'E', 'A', 'D', 'G', 'B', 'E' ]
fret.simpleTuning('charango') => [ 'G', 'C', 'E', 'A', 'E' ]

names(aliases) ⇒ Array

Get all available tuning names

Kind: global function
Returns: Array - an array of tuning names

ParamTypeDescription
aliasesBooleanget aliases or not

build(tuning, first, last) ⇒ Array

Build a fretboard using a given tuning (or tuning name) and first and last fret numbers

Kind: global function
Returns: Array - An array of arrays, one for each string

ParamTypeDescription
tuningString | Arraythe tuning name or notes
firstIntegerthe first fret number
lastIntegerthe last fret number

scale(tuning, scale, first, last) ⇒ Array

Build a fretboard only showing the notes for the given scale.

Kind: global function
Returns: Array - An array of arrays, one for each string

ParamTypeDescription
tuningString | Arraythe tuning name or notes
scaleString | Arraythe scale notes
firstIntegerthe first fret number
lastIntegerthe last fret number

chordShapes(tuning, notes, first, last, span) ⇒ Array

Build an array of reachable chord shapes based on given notes and tuning.

Kind: global function
Returns: Array - An array of arrays, one for each possible shape.

ParamTypeDescription
tuningString | Arraythe tuning name or notes
notesArrayan array of chord notes
firstIntegerthe first fret number
lastIntegerthe last fret number
spanIntegerhow many frets to include per position
0.69.9

7 years ago

0.69.8

7 years ago

0.69.7

7 years ago

0.69.6

7 years ago

0.69.5

7 years ago

0.69.4

7 years ago

0.69.3

7 years ago

0.69.2

7 years ago

0.69.1

7 years ago

0.69.0

7 years ago

0.68.1

7 years ago

0.68.0

7 years ago

0.67.0

7 years ago

0.66.0

7 years ago

0.65.0

7 years ago

0.64.1

7 years ago

0.64.0

7 years ago

0.63.1

7 years ago

0.63.0

7 years ago

0.62.0

7 years ago

0.61.0

7 years ago

0.60.0

7 years ago

0.0.1

8 years ago