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.
Name | Summary | ||
---|---|---|---|
Events - Core | |||
errorAll | This event is fired when an error within alphatab occurred. | ||
postRenderFinishedAll | This event is fired when the rendering of the whole music sheet is finished, and all handlers of `renderFinished` ran. | ||
renderFinishedAll | This event is fired when the rendering of the whole music sheet is finished. | ||
renderStartedAll | This event is fired when the rendering of the whole music sheet is starting. | ||
resizeAll | This event is fired when alphaTab was resized and is about to rerender the music notation. | ||
scoreLoadedAll | This event is fired whenever a new song is loaded. | ||
Events - Player | |||
activeBeatsChangedAll | This event is fired when the currently active beats across all tracks change. | ||
beatMouseDownAll | This event is fired whenever a the user presses the mouse button on a beat. | ||
beatMouseMoveAll | This event is fired whenever the user moves the mouse over a beat after the user already pressed the button on a beat. | ||
beatMouseUpAll | This event is fired whenever the user releases the mouse after a mouse press on a beat. | ||
midiEventsPlayedAll | This event is fired when the synthesizer played certain midi events. | ||
midiLoadAll | This event is fired when a Midi file is being loaded. | ||
midiLoadedAll | This event is fired when the Midi file needed for playback was loaded. | ||
noteMouseDownAll | This event is fired whenever a the user presses the mouse button on a note head/number. | ||
noteMouseMoveAll | This event is fired whenever the user moves the mouse over a note after the user already pressed the button on a note. | ||
noteMouseUpAll | This event is fired whenever the user releases the mouse after a mouse press on a note. | ||
playbackRangeChangedAll | This event is fired when the playback range changed. | ||
playedBeatChangedAll | This event is fired when the played beat changed. | ||
playerFinishedAll | This event is fired when the playback of the whole song finished. | ||
playerPositionChangedAll | This event is fired when the current playback position of the song changed. | ||
playerReadyAll | This event is fired when all required data for playback is loaded and ready. | ||
playerStateChangedAll | This event is fired when the playback state changed. | ||
soundFontLoadJavaScript | This event is fired when the SoundFont is being loaded. | ||
soundFontLoadedAll | This event is fired when the SoundFont needed for playback was loaded. | ||
Methods - Core | |||
destroyAll | Destroys the alphaTab control and restores the initial state of the UI. | ||
downloadMidiJavaScript | Generates an SMF1.0 file and downloads it | ||
printJavaScript | Opens a popup window with the rendered music notation for printing. | ||
renderAll | Initiates a re-rendering of the current setup. | ||
renderScoreAll | Initiates a rendering of the given score. | ||
renderTracksAll | Renders the given list of tracks. | ||
texAll | Tells alphaTab to render the given alphaTex. | ||
updateSettingsAll | Applies any changes that were done to the settings object. | ||
Methods - Player | |||
changeTrackMuteAll | Changes the given tracks to be muted or not. | ||
changeTrackSoloAll | Changes the given tracks to be played solo or not. | ||
changeTrackTranspositionPitchAll | Changes the pitch transpose applied to the given tracks. | ||
changeTrackVolumeAll | Changes the volume of the given tracks. | ||
enumerateOutputDevicesAll | Loads and lists the available output devices which can be used by the player. | ||
getOutputDeviceAll | The currently configured output device if changed via <code style={{"color":"#393A34","backgroundColor":"#f6f8fa"}}><span style={{"color":"#36acaa"}}>{"setOutputDevice"}</span></code>. | ||
loadAll | Initiates a load of the score using the given data. | ||
loadSoundFontAll | Triggers a load of the soundfont from the given data. | ||
loadSoundFontFromUrlJavaScript | Triggers a load of the soundfont from the given URL. | ||
pauseAll | Pauses the playback of the current song. | ||
playAll | Starts the playback of the current song. | ||
playBeatAll | Triggers the play of the given beat. | ||
playNoteAll | Triggers the play of the given note. | ||
playPauseAll | Toggles between play/pause depending on the current player state. | ||
resetSoundFontsAll | Unloads all presets from previously loaded SoundFonts. | ||
scrollToCursorAll | Initiates a scroll to the cursor. | ||
setOutputDeviceAll | Changes the output device which should be used for playing the audio (player must be enabled). | ||
stopAll | Stops the playback of the current song, and moves the playback position back to the start. | ||
Properties - Core | |||
boundsLookupAll | The tick cache allowing lookup of midi ticks to beats. | ||
canvasElementAll | The UI container that will hold all rendered results. | ||
containerAll | The UI container that holds the whole alphaTab control. | ||
rendererAll | The score renderer used for rendering the music sheet. | ||
scoreAll | The score holding all information about the song being rendered | ||
settingsAll | The settings that are used for rendering the music notation. | ||
tracksAll | The list of the tracks that are currently rendered. | ||
uiFacadeAll | Gets the UI facade to use for interacting with the user interface. | ||
Properties - Player | |||
countInVolumeAll | The volume of the count-in metronome ticks. | ||
isLoopingAll | Whether the playback should automatically restart after it finished. | ||
isReadyForPlaybackAll | Whether the player is ready for starting the playback. | ||
masterVolumeAll | The current master volume as percentage (0-1). | ||
metronomeVolumeAll | The metronome volume as percentage (0-1). | ||
midiEventsPlayedFilterAll | The midi events which will trigger the `midiEventsPlayed` event | ||
playbackRangeAll | The range of the song that should be played. | ||
playbackSpeedAll | The current playback speed as percentage | ||
playerAll | The alphaSynth player used for playback. | ||
playerStateAll | The current player state. | ||
tickCacheAll | The tick cache allowing lookup of midi ticks to beats. | ||
tickPositionAll | The position within the song in midi ticks. | ||
timePositionAll | The position within the song in milliseconds |