API Docs for: 1.4.4
Show:

ukeGeeks.chordImport.chordParts Class

Internal storage of partially converted "define" statements. The Definition (string) and addIn (array)

Constructor

ukeGeeks.chordImport.chordParts

() private

Methods

_addInDots

(
  • dots
  • adds
)
Void private

If a valid "add" instruction is present pushes a new dot object into dots array.

Parameters:

  • dots array
  • adds Array

    array of "add instruction" to be parsed (i.e. "add: string G fret 1 finger 1")

Returns:

Void:

_fretOMatic

(
  • text
  • frets
  • muted
)
Void private

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 String

    string to be searched

  • frets Array
  • muted Array

Returns:

Void:

_getAddIns

(
  • txt
)
Void private

TODO:

Parameters:

  • txt String

Returns:

Void:

_getExpandedChord

(
  • text
  • adds
)
Void private

TODO:

Parameters:

  • text Type
  • adds Type

Returns:

Void:

_getFingers

(
  • text
)
Array private

TODO:

Parameters:

  • text String

    string to be searched

Returns:

Array:

_getInstrument

(
  • text
)
String private

TODO:

Parameters:

  • text String

    Single statement to be searched

Returns:

String:

_getKey

(
  • name
  • tuning
)
String private

TODO:

Parameters:

  • name String
  • tuning Array

Returns:

String:

_getName

(
  • text
)
String private

TODO:

Parameters:

  • text String

    Single statement to be searched

Returns:

String:

_getTuning

(
  • text
)
String private

TODO: expects FOUR strings.

Parameters:

  • text String

    Single statement to be searched

Returns:

String:

_lineToParts

(
  • line
)
Array private

TODO:

Parameters:

  • line String

    Single line (string with one statment)

Returns:

Array:

_log

(
  • msg
)
Void private

Add an error. As one would with console.log("blah").

Parameters:

  • msg String

    Error message to be added

Returns:

Void:

_partsToChords

(
  • parts
)
Void private

TODO:

Parameters:

  • parts Type

Returns:

Void:

_textToParts

(
  • line
)
Void private

TODO:

Parameters:

  • line Array

    Array of lines (stings) each wtih one statment

Returns:

Void:

_toDots

(
  • frets
  • fingers
)
array private

Pass in integer arrays, frets is list of frets, plus corresponding fingers array

Parameters:

  • frets Array
  • fingers Array

Returns:

array:

array of dots

runBlock

(
  • text
)
ukeGeeks.data.instrument

Returns array of expandedChord objects (JSON), converted from text input.

Parameters:

  • text String

    Multiline text block containing definition, instrument, and tuning statements.

runLine

(
  • line
)
ukeGeeks.data.expandedChord

Returns an expandedChord object (JSON) converted from single statement text input line.

Parameters:

  • line String

    Single line (string with one statment)

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!