Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Tuning

Tuning implements varies types of tunings for tablature.

Hierarchy

  • Tuning

Index

Constructors

constructor

  • new Tuning(tuningString?: string): Tuning
  • Constructor.

    Parameters

    • tuningString: string = 'E/5,B/4,G/4,D/4,A/3,E/3,B/2,E/2'

      tuning name (eg. 'dagdad') or comma separated note strings

    Returns Tuning

Accessors

Static names

  • get names(): Record<string, string>
  • Returns Record<string, string>

Methods

getNoteForFret

  • getNoteForFret(fretNum: string | number, stringNum: string | number): string
  • Return the note string associated with tablature string and fret.

    Parameters

    • fretNum: string | number
    • stringNum: string | number

    Returns string

getValueForFret

  • getValueForFret(fretNum: string | number, stringNum: string | number): number
  • Return the note number associated with a tablature string and fret.

    Parameters

    • fretNum: string | number
    • stringNum: string | number

    Returns number

getValueForString

  • getValueForString(stringNum: string | number): number
  • Return the note number associated with a tablature string.

    Parameters

    • stringNum: string | number

    Returns number

noteToInteger

  • noteToInteger(noteString: string): number
  • Return the note number associated to the note string.

    Parameters

    • noteString: string

    Returns number

setTuning

  • setTuning(tuningString: string): void
  • Set tuning identified by tuning name (eg. 'dagdad')

    Parameters

    • tuningString: string

      tuning name (eg. 'dagdad') or comma separated note strings

    Returns void