GuitarChord

new GuitarChord(Guitar guitar, Chord chord, array notes)

GuitarChord - a class for representing a guitar chord
Parameters:
Name Type Description
guitar Guitar a Guitar object on which this chord is played
chord Chord a Chord object
notes array a collection of GuitarNote objects (optional)
Source:

Members

<static> MAX_STRETCH

maximum finger stretch
Source:

<inner> ease

how easy it is to play the chord. these factors add weight: - each note played + 1 for each note played - the distance of each note relative to the previous note + 1 for each extra fret distance between two notes - the distance of the note to the base note - the number of fingers used + 1 for each finger used, + 100 if more than all fingers are used (impossible) lower is better, no note has ease 0, 1 note at least ease 1
Source:

<inner> fingersUsed

five fingers that we can use In case you're Django, please remove the last three items from the list 0 : thumb 1 : index 2 : middle 3 : ring 4 : pinky
Source:

Methods

<static> fromChord(Guitar guitar, Chord chord)GuitarChord

finds all variations of a particular chord on the guitar neck the chord should be relative - find the tonic on each fret
Parameters:
Name Type Description
guitar Guitar A Guitar object
chord Chord A chord object
Source:
Returns:
Type
GuitarChord

<static> fromChordAndBase(Guitar guitar, Chord chord, GuitarNote base, object options) → array

finds all variations of a particular chord with a specific tonic. All these
Parameters:
Name Type Description
guitar Guitar the guitar object (with specific tuning)
chord Chord the Chord object to find specific GuitarChords for
base GuitarNote the Base note we want to base the chord on (GuitarNote)
options object an object specifying more options: upPreference: false maxFingerStretch: 2 maxDifficulty: 10
Source:
Returns:
an array of GuitarChord objects
Type
array

barre() → integer

barre -
Source:
To Do:
  • test function
Returns:
how many fingers can be played barre. Calculated from the top string
Type
integer

valid() → boolean

check if a guitar chord is valid this is when all notes can be matched with a note in the chord object.
Source:
To Do:
  • implement function
Returns:
- true if the chord is valid
Type
boolean