Functions called when an AlphaTab listener is triggered
Methods
# static alphaTabPlayerFinished()
Resets the time back to the beginning of the song and our tracker points at the beginning of the piece again
# static alphaTabPlayerStateChanged()
Handles changes to AlphaTab's player state
# static alphaTabPostRenderFinished()
Run when AlphaTab is rendered on the screen
# inner getSheetMusicLedgerHeights(topLine, nextLine) → {module:alphaTabListeners~LedgerHeightsPackage}
Gets the top line height and distance between ledger lines based on the sheet music
Parameters:
Name | Type | Description |
---|---|---|
topLine |
object | |
nextLine |
object |
An object containing the top line height and distance between lines
# inner initializeFeedbackDrawer(topLine, nextLine)
Creates an instance of the of the the drawer
Parameters:
Name | Type | Description |
---|---|---|
topLine |
object | The top line DOM element |
nextLine |
object | The next line DOM element |
# async inner onFirstRender()
On the first render, isFirstRender will be false and this will signal an initial setup of the variables
# inner onSubsequentRender()
During page turns, we only need to update a subset of variables
# inner resetSheetMusic()
Clears the p5 drawing for real-time feedback.
Resets the sheet music back to the beginning.
# inner stopPlayingMusic()
Stops playing the music.
Shuts off pitch detection (this does not turn the microphone off).
Resets the sheet music (this is due to pagination).
Type Definitions
# LedgerHeightsPackage
Properties:
Name | Type | Description |
---|---|---|
topLineHeight |
number | The y height of the top ledger line |
distanceBetweenLines |
number | The y distance between ledger lines |