Skip to main content

API

On many platforms an alphaTab API object can be used to bootstrap alphaTab within your UI. It takes over all responsibilities of linking your actions to the UI. Namely this object is called AlphaTabApi (Web) or AlphaTabApiBase<> (.net). This page describes all methods, properties and events exposed by this API object.

NameSummary
Events - Core
errorJavaScriptalphaTab.errorjQuery
alphaTab.errorHTML
Error.net
This event is fired when an error within alphatab occurred.
postRenderFinishedJavaScriptalphaTab.postRenderFinishedjQuery
alphaTab.postRenderFinishedHTML
PostRenderFinished.net
This event is fired when the rendering of the whole music sheet is finished, and all handlers of RenderFinished ran.
renderFinishedJavaScriptalphaTab.renderFinishedjQuery
alphaTab.renderFinishedHTML
RenderFinished.net
This event is fired when the rendering of the whole music sheet is finished.
renderStartedJavaScriptalphaTab.renderStartedjQuery
alphaTab.renderStartedHTML
RenderStarted.net
This event is fired when the rendering of the whole music sheet is starting.
resizeJavaScriptalphaTab.resizejQuery
alphaTab.resizeHTML
Resize.net
This event is fired when alphaTab was resized and is about to rerender the music notation.
scoreLoadedJavaScriptalphaTab.scoreLoadedjQuery
alphaTab.scoreLoadedHTML
ScoreLoaded.net
This event is fired whenever a new song is loaded
Events - Player
beatMouseDownJavaScriptalphaTab.beatMouseDownjQuery
alphaTab.beatMouseDownHTML
BeatMouseDown.net
This event is fired whenever a the user presses the mouse button on a beat.
beatMouseMoveJavaScriptalphaTab.beatMouseMovejQuery
alphaTab.beatMouseMoveHTML
BeatMouseMove.net
This event is fired whenever the user moves the mouse over a beat after the user already pressed the button on a beat.
beatMouseUpJavaScriptalphaTab.beatMouseUpjQuery
alphaTab.beatMouseUpHTML
BeatMouseUp.net
This event is fired whenever the user releases the mouse after a mouse press on a beat.
midiEventsPlayedJavaScriptalphaTab.midiEventsPlayedjQuery
alphaTab.midiEventsPlayedHTML
MidiEventsPlayed.net
The midi events which will trigger the `midiEventsPlayed` event
midiLoadJavaScriptalphaTab.midiLoadjQuery
alphaTab.midiLoadHTML
MidiLoad.net
This event is fired when a Midi file is being loaded.
midiLoadedJavaScriptalphaTab.midiLoadedjQuery
alphaTab.midiLoadedHTML
MidiLoaded.net
This event is fired when the Midi file needed for playback was loaded.
noteMouseDownJavaScriptalphaTab.noteMouseDownjQuery
alphaTab.noteMouseDownHTML
NoteMouseDown.net
This event is fired whenever a the user presses the mouse button on a note head/number.
noteMouseMoveJavaScriptalphaTab.noteMouseMovejQuery
alphaTab.noteMouseMoveHTML
NoteMouseMove.net
This event is fired whenever the user moves the mouse over a note after the user already pressed the button on a note.
noteMouseUpJavaScriptalphaTab.noteMouseUpjQuery
alphaTab.noteMouseUpHTML
NoteMouseUp.net
This event is fired whenever the user releases the mouse after a mouse press on a note.
playbackRangeChangedJavaScriptalphaTab.playbackRangeChangedjQuery
alphaTab.playbackRangeChangedHTML
PlaybackRangeChanged.net
This event is fired when the playback range changed.
playedBeatChangedJavaScriptalphaTab.playedBeatChangedjQuery
alphaTab.playedBeatChangedHTML
PlayedBeatChanged.net
This event is fired when the played beat changed.
playerFinishedJavaScriptalphaTab.playerFinishedjQuery
alphaTab.playerFinishedHTML
PlayerFinished.net
This event is fired when the playback of the whole song finished.
playerPositionChangedJavaScriptalphaTab.playerPositionChangedjQuery
alphaTab.playerPositionChangedHTML
PlayerPositionChanged.net
This event is fired when the playback state changed.
playerReadyJavaScriptalphaTab.playerReadyjQuery
alphaTab.playerReadyHTML
PlayerReady.net
This event is fired when all required data for playback is loaded and ready.
playerStateChangedJavaScriptalphaTab.playerStateChangedjQuery
alphaTab.playerStateChangedHTML
PlayerStateChanged.net
This event is fired when the playback state changed.
soundFontLoadJavaScriptalphaTab.soundFontLoadjQuery
alphaTab.soundFontLoadHTML
SoundFontLoad.net
This event is fired when the SoundFont is being loaded.
soundFontLoadedJavaScriptalphaTab.soundFontLoadedjQuery
alphaTab.soundFontLoadedHTML
SoundFontLoaded.net
This event is fired when the SoundFont needed for playback was loaded.
Methods - Core
alphaTab()jQueryInitializes AlphaTab.
destroy()JavaScriptalphaTab('destroy')jQuery
Destroy().net
Destroys the alphaTab control and restores the initial state of the UI.
load()JavaScriptalphaTab('load')jQuery
Load().net
Initiates a load of the score using the given data.
print()JavaScriptalphaTab('print')jQueryOpens a popup window with the rendered music notation for printing.
render()JavaScriptalphaTab('render')jQuery
Render().net
Initiates a re-rendering of the current setup.
renderScore()JavaScriptalphaTab('renderScore')jQuery
RenderScore().net
Initiates a rendering of the given score.
renderTracks()JavaScriptalphaTab('renderTracks')jQuery
RenderTracks().net
Initiates a rendering of the given tracks.
tex()JavaScriptalphaTab('tex')jQuery
Tex().net
Tells alphaTab to render the given alphaTex.
updateSettings()JavaScriptalphaTab('updateSettings')jQuery
UpdateSettings().net
Applies any changes that were done to the settings object and informs the Renderer about any new values to consider.
Methods - Player
changeTrackMute()JavaScriptalphaTab('muteTracks')jQuery
ChangeTrackMute().net
Changes the given tracks to be muted or not.
changeTrackSolo()JavaScriptalphaTab('soloTracks')jQuery
ChangeTrackSolo().net
Changes the given tracks to be played solo or not.
changeTrackVolume()JavaScriptalphaTab('trackVolume')jQuery
ChangeTrackVolume().net
Changes the volume of the given tracks.
loadSoundFont()JavaScriptalphaTab('loadSoundFont')jQuery
LoadSoundFont().net
Triggers a load of the soundfont from the given data.
pause()JavaScriptalphaTab('pause')jQuery
Pause().net
Pauses the playback of the current song.
play()JavaScriptalphaTab('play')jQuery
Play().net
Starts the playback of the current song.
playBeat()JavaScriptalphaTab('playBeat')jQuery
PlayBeat().net
Triggers the play of the given beat.
playNote()JavaScriptalphaTab('playNote')jQuery
PlayNote().net
Triggers the play of the given note.
playPause()JavaScriptalphaTab('playPause')jQuery
PlayPause().net
Toggles between play/pause depending on the current player state.
resetSoundFonts()JavaScriptalphaTab('resetSoundFonts')jQuery
ResetSoundFonts().net
Unloads all presets from previously loaded SoundFonts.
stop()JavaScriptalphaTab('stop')jQuery
Stop().net
Stops the playback of the current song, and moves the playback position back to the start.
Properties - Core
containerJavaScriptalphaTab('container')jQuery
Container.net
The UI container that holds the whole alphaTab control.
rendererJavaScriptalphaTab('renderer')jQuery
Renderer.net
The score renderer used for rendering the music sheet. This is the low-level API responsible for the actual rendering chain.
scoreJavaScriptalphaTab('score')jQuery
Score.net
The score holding all information about the song being rendered
settingsJavaScriptalphaTab('settings')jQuery
Settings.net
The settings that are used for rendering the music notation
alphaTab('api')jQueryReturns the underlying API object.
tracksJavaScriptalphaTab('tracks')jQuery
Tracks.net
A list of the tracks that should be rendered based on the Score and TrackIndexes properties
Properties - Player
countInVolumeJavaScriptalphaTab('countInVolume')jQuery
CountInVolume.net
The volume of the count-in metronome ticks
isLoopingJavaScriptalphaTab('looping')jQuery
IsLooping.net
Whether the playback should automatically restart after it finished
isReadyForPlaybackJavaScriptalphaTab('isReadyForPlayback')jQuery
IsReadyForPlayback.net
Whether the player is ready for starting the playback.
masterVolumeJavaScriptalphaTab('masterVolume')jQuery
MasterVolume.net
The current master volume as percentage
metronomeVolumeJavaScriptalphaTab('metronomeVolume')jQuery
MetronomeVolume.net
The metronome volume as percentage
midiEventsPlayedFilterJavaScriptalphaTab('midiEventsPlayedFilter')jQuery
MidiEventsPlayedFilter.net
The midi events which will trigger the `midiEventsPlayed` event
playbackRangeJavaScriptalphaTab('playbackRange')jQuery
PlaybackRange.net
The range of the song that should be played
playbackSpeedJavaScriptalphaTab('playbackSpeed')jQuery
PlaybackSpeed.net
The current playback speed as percentage
playerJavaScriptalphaTab('player')jQuery
Player.net
The alphaSynth player used for playback. This is the low-level API to the Midi synthesizer used for playback.
playerStateJavaScriptalphaTab('playerState')jQuery
PlayerState.net
The current player state
tickCacheJavaScriptalphaTab('tickCache')jQuery
TickCache.net
The tick cache allowing lookup of midi ticks to beats.
tickPositionJavaScriptalphaTab('tickPosition')jQuery
TickPosition.net
The position within the song in midi ticks
timePositionJavaScriptalphaTab('timePosition')jQuery
TimePosition.net
The position within the song in milliseconds