ukeGeeks.chordImport.chordParts Class
Internal storage of partially converted "define" statements. The Definition (string) and addIn (array
Constructor
ukeGeeks.chordImport.chordParts
()
private
Item Index
Methods
Properties
Methods
_addInDots
-
dots
-
adds
If a valid "add" instruction is present pushes a new dot object into dots array.
Parameters:
-
dots
array -
adds
Arrayarray of "add instruction" to be parsed (i.e. "add: string G fret 1 finger 1")
Returns:
_fretOMatic
-
text
-
frets
-
muted
TODO: Change will affect "packed" chord fingers -- spaces required. No longer accepts "frets 1231", it must be "frets 1 2 3 1" Replaces _getFrets. Sets frets and muted arrays.
Parameters:
-
text
Stringstring to be searched
-
frets
Array -
muted
Array
Returns:
_getAddIns
-
txt
TODO:
Parameters:
-
txt
String
Returns:
_getExpandedChord
-
text
-
adds
TODO:
Parameters:
-
text
Type -
adds
Type
Returns:
_getFingers
-
text
TODO:
Parameters:
-
text
Stringstring to be searched
Returns:
_getInstrument
-
text
TODO:
Parameters:
-
text
StringSingle statement to be searched
Returns:
_getKey
-
name
-
tuning
TODO:
Parameters:
-
name
String -
tuning
Array
Returns:
_getName
-
text
TODO:
Parameters:
-
text
StringSingle statement to be searched
Returns:
_getTuning
-
text
TODO: expects FOUR strings.
Parameters:
-
text
StringSingle statement to be searched
Returns:
_lineToParts
-
line
TODO:
Parameters:
-
line
StringSingle line (string with one statment)
Returns:
_log
-
msg
Add an error. As one would with console.log("blah").
Parameters:
-
msg
StringError message to be added
Returns:
_partsToChords
-
parts
TODO:
Parameters:
-
parts
Type
Returns:
_textToParts
-
line
TODO:
Parameters:
-
line
ArrayArray of lines (stings) each wtih one statment
Returns:
_toDots
-
frets
-
fingers
Pass in integer arrays, frets is list of frets, plus corresponding fingers array
Parameters:
-
frets
Array -
fingers
Array
Returns:
array of dots
runBlock
-
text
Returns array of expandedChord objects (JSON), converted from text input.
Parameters:
-
text
StringMultiline text block containing definition, instrument, and tuning statements.
Returns:
runLine
-
line
Returns an expandedChord object (JSON) converted from single statement text input line.
Parameters:
-
line
StringSingle line (string with one statment)
Returns:
Properties
regEx
JSON Object of Regular Expressions
private
All regular expressions used in this class. Note, Changed parsing from "\n" to "{" which means "define: ..." cannot depend on that opening curly-brace!