AlphaTab actions.
For initialization and destruction of AlphaTab, see initialization and destruction.
Methods
# static changePart(partName)
Change which track Alpha Tab is rendering based on the given part name
Parameters:
Name | Type | Description |
---|---|---|
partName |
string | The part name to change to. Part names are expected to be "tx" where x is the track index |
# static changeToExercise(measureStart, measureEnd)
Cause AlphaTab to generate an exercise of the current part from measureStart to measureEnd
Parameters:
Name | Type | Description |
---|---|---|
measureStart |
number | The start measure number. Note: It is assumed that this has already been error checked |
measureEnd |
number | The end measure number. Note: It is assumed that this has already been error checked |
# static changeToMyPart()
Renders isolated user part from sheet music through AlphaTab with Real Time Feedback from P5
# static changeToPerformance()
Renders performance overview using AlphaTab and Performance Highlighting from P5
# static changeToSheetMusic()
Renders sheet music through AlphaTab with Real Time Feedback from P5
# static getMyPart() → {string}
Gets the member's part for the sheet music (e.g. Soprano)
The member's part
string
# static getPartList() → {Array.<string>}
Gets all parts of the sheet music (e.g. alto, soprano, etc.)
An array of parts
Array.<string>
# static getPlaybackRange() → {Array.<number>}
Converts the playback range if defined in AlphaTab to the measure numbers that start and end that range
Either an array with the start and end measure numbers or null if there is no playback range
Array.<number>
# static loadJustMyPart()
Loads just the user's part for this sheet music logging it as an exercise and isolates their part for playback
# static loadTex(partName)
Loads AlphaTex for the current piece of sheet music rendering the user's part if initialized otherwise the provided part
Parameters:
Name | Type | Description |
---|---|---|
partName |
string | Name of the part to render during load |
# static startPlayingMusic()
Starts playing the sheet music and getting pitches from the microphone
# static stopPlayingMusic()
Stops playing the music.
Resets the noteStreamIndex and the cumulativeTime.
# static timeToMeasureNumber(currentPosition, currentMeasure, measureToLength)
Converts a time position in seconds to what measure that it occurs in
Parameters:
Name | Type | Description |
---|---|---|
currentPosition |
number | The current time position that we are on |
currentMeasure |
number | The current measure number that we are on |
measureToLength |
Array.<number> | Array holding the length of each measure in seconds |
# async inner loadExercise(measureStart, measureEnd)
Loads an exercise based on user provided measure numbers
Parameters:
Name | Type | Description |
---|---|---|
measureStart |
number | The start measure number. Note: It is assumed that this has already been error checked |
measureEnd |
number | The end measure number. Note: It is assumed that this has already been error checked |