Class: ConvertToTex

ConvertToTex()

Encapsulates functions to transform internal AlphaTexStructure back into AlphaTex

Constructor

new ConvertToTex()

Source:

Methods

attributesStrTex(attributesStr) → {string}

Converts the provided attributes String mapping to AlphaTex
Parameters:
Name Type Description
attributesStr Map The attribute String mapping to convert. Map String attributes to String values
Source:
Returns:
The generated AlphaTex
Type
string

effectToSymbol(effect) → {string}

Converts the provided effect back to its AlphaTex version
Parameters:
Name Type Description
effect string The effect String to be converted (expects one of: tied, dotted, crescendo, decrescendo)
Source:
Returns:
The AlphaTex version of the effect
Type
string

getEffectText(effects) → {string}

Converts the provided Map to a space separated list of key and value pairs
Parameters:
Name Type Description
effects Map Map to be converted
Source:
Returns:
The space separated list of key and value pairs
Type
string

visitAlphaTexStructure(alphaTexStructure, lyrics) → {string}

Converts provided AlphaTexStructure into AlphaTex
Parameters:
Name Type Description
alphaTexStructure AlphaTexStructure The AlphaTexStructure to be converted
lyrics object Lyrics per track. Expected mapping track index number to lyric string
Source:
Returns:
The generated AlphaTex
Type
string

visitChord(chord) → {string}

Converts the provided Chord to AlphaTex
Parameters:
Name Type Description
chord Chord The Chord to be converted
Source:
Returns:
The generated AlphaTex
Type
string

visitMeasure(measure) → {string}

Converts the provided Measure to AlphaTex
Parameters:
Name Type Description
measure Measure The Measure to be converted
Source:
Returns:
The generated AlphaTex
Type
string

visitNote(note, splitInfo) → {NotePackage|string}

Converts the provided Note to AlphaTex
Parameters:
Name Type Description
note Note The Note to be translated
splitInfo boolean Boolean set to true if the translated information should be returned as an object (split into pieces)
Source:
Returns:
If splitInfo is true, returns a NotePackage. Else, returns the generated AlphaTex
Type
NotePackage | string

visitStaff(staff, lyrics) → {string}

Converts the provided Staff to AlphaTex
Parameters:
Name Type Description
staff Staff The Staff to be converted
lyrics object Lyrics per track. Expected mapping track index number to lyric string
Source:
Returns:
The generated AlphaTex
Type
string

visitTrack(track, lyrics) → {string}

Converts the provided Track to AlphaTex
Parameters:
Name Type Description
track Track The Track to be converted
lyrics object Lyrics per track. Expected mapping track index number to lyric string
Source:
Returns:
The generated AlphaTex
Type
string

visitTrackData(trackData, lyrics) → {string}

Converts the provided TrackData to AlphaTex
Parameters:
Name Type Description
trackData TrackMetaData The TrackMetaData to be converted
lyrics object Lyrics per track. Expected mapping track index number to lyric string
Source:
Returns:
The generated AlphaTex
Type
string