API Docs for: 1.4.4
Show:

ukeGeeks.definitions Class

Defines chords and provides simple lookup (find) tools.

Methods

_get

(
  • chordName
)
ExpandedChord private

Pass in "standard" chord name, returns match from defined chords or null if not found

Parameters:

  • chordName String

    Chord name

Returns:

ExpandedChord:

_getAlias

(
  • chordName
)
String

A chord name normalizer: We don't store any chord definitions for A#, Db, D#, Gb, or Ab. Instead definitions of the more common notes are stored instead. So for the A# fingering we return the Bb fingering and so on.

Returns original chord name if there is no defined alias.

Parameters:

  • chordName String

    [

Returns:

String:

add

(
  • data
)
Int

Parameters:

  • data Array

    array of expanded chord objects

Returns:

Int:

addInstrument

(
  • definitions
)
Void

Define an instrument's chord dictionary, this makes this instrument avaiable for showing its chord diagrams.

Parameters:

  • definitions Mixed

    (Either string or array of strings) Block of CPM text -- specifically looks for instrurment, tuning, and define statements.

Returns:

Void:

get

(
  • chordName
)
ExpandedChord

Returns expanded ChordObject for requested "chord"

Parameters:

  • chordName String

    Chord name

Returns:

ExpandedChord:

getChords

() ArrayChords

Getter for chord array (compactChord format) -- full library of predefined chords. Mainly used for debugging.

Returns:

ArrayChords:

replace

(
  • data
)
Int

Parameters:

  • data Array

    array of expanded chord objects

Returns:

Int:

useInstrument

(
  • offset
)
Void

Choose which instrument's chord dictionary you want used for the chord diagrams. NOTE: .

Parameters:

  • offset Int

    (optional) default 0. Number of semitones to shif the tuning.

Returns:

Void:

Properties

_public

Object

attach public members to this object

_userChords

Array private

Array of "user" defined chords, in compactChord format. Use "Add" method.

instrument

JSON

Enum (simple JSON name/value pairs) defining instrument tunings (offsets from standard Soprano Ukulele)