alphaTab.AlphaTabApi
(no description)
class AlphaTabApi extends AlphaTabApiBase<SettingsJson | Settings>Properties​
actualPlayerMode​
The actual player mode which is currently active. Allows determining whether a backing track or the synthesizer is active in case automatic detection is enabled. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly actualPlayerMode: PlayerMode;PlayerMode ActualPlayerMode { get; }val actualPlayerMode: PlayerModeboundsLookup​
The tick cache allowing lookup of midi ticks to beats. In older versions of alphaTab you can access the boundsLookup via boundsLookup on renderer .
After the rendering completed alphaTab exposes via this lookup the location of the individual
notation elements. The lookup provides fast access to the bars and beats at a given location.
If the CoreSettings.includeNoteBounds option was activated also the location of the individual notes can be obtained.
The property contains a BoundsLookup instance which follows a hierarchical structure that represents
the tree of rendered elements.
The hierarchy is: staffSystems > bars(1) > bars(2) > beats > notes
staffSystems- Represent the bounds of the individual systems ("rows") where staves are contained.bars(1)- Represent the bounds of all bars for a particular master bar across all tracks.bars(2)- Represent the bounds of an individual bar of a track. The bounds on y-axis span the region of the staff and notes might exceed this bounds.beats- Represent the bounds of the individual beats within a track. The bounds on y-axis are equal to the bar bounds.notes- Represent the bounds of the individual note heads/numbers within a track.
Each bounds hierarchy have a visualBounds and realBounds.
visualBounds- Represent the area covering all visually visible elementsrealBounds- Represents the actual bounds of the elements in this beat including whitespace areas.noteHeadBounds(only onnoteslevel) - Represents the area of the note heads or number based on the staff
You can check out the individual sizes and regions. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly boundsLookup: BoundsLookup | null;BoundsLookup? BoundsLookup { get; }val boundsLookup: BoundsLookup?canvasElement​
The UI container that will hold all rendered results. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
container​
The UI container that holds the whole alphaTab control. Gets the UI container that represents the element on which alphaTab was initialized. Note that this is not the raw instance, but a UI framework specific wrapper for alphaTab. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
countInVolume​
The volume of the count-in metronome ticks. Gets or sets the volume of the metronome during the count-in of the song. By default the count-in is disabled but can be enabled by setting the volume different. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
countInVolume: number = 0;double CountInVolume { get; set; } = 0var countInVolume: Double = 0customScrollHandler​
A custom scroll handler which will be used to handle scrolling operations during playback. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
customScrollHandler?: IScrollHandler;IScrollHandler CustomScrollHandler { get; set; }var customScrollHandler: IScrollHandlerendTick​
The total length of the song in midi ticks. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly endTick: number;double EndTick { get; }val endTick: DoubleendTime​
The total length of the song in milliseconds. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly endTime: number;double EndTime { get; }val endTime: DoubleisLooping​
Whether the playback should automatically restart after it finished. This setting controls whether the playback should automatically restart after it finished to create a playback loop. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
isLooping: boolean = false;bool IsLooping { get; set; } = falsevar isLooping: Boolean = falseisReadyForPlayback​
Whether the player is ready for starting the playback. Gets whether the synthesizer is ready for playback. The player is ready for playback when
all background workers are started, the audio output is initialized, a soundfont is loaded, and a song was loaded into the player as midi file. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly isReadyForPlayback: boolean;bool IsReadyForPlayback { get; }val isReadyForPlayback: BooleanmasterVolume​
The current master volume as percentage (0-1). Gets or sets the master volume of the overall audio being played. The volume is annotated in percentage where 1.0 would be the normal volume and 0.5 only 50%. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
masterVolume: number;double MasterVolume { get; set; }var masterVolume: DoublemetronomeVolume​
The metronome volume as percentage (0-1). Gets or sets the volume of the metronome. By default the metronome is disabled but can be enabled by setting the volume different. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
metronomeVolume: number = 0;double MetronomeVolume { get; set; } = 0var metronomeVolume: Double = 0midiEventsPlayedFilter​
The midi events which will trigger the midiEventsPlayed event Gets or sets the midi events which will trigger the midiEventsPlayed event. With this filter set you can enable
that alphaTab will signal any midi events as they are played by the synthesizer. This allows reacing on various low level
audio playback elements like notes/rests played or metronome ticks.
Refer to the related guide to learn more about this feature. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
midiEventsPlayedFilter: MidiEventType[] = [];IList<MidiEventType> MidiEventsPlayedFilter { get; set; } = []var midiEventsPlayedFilter: alphaTab.collections.List<MidiEventType> = []midiTickShift​
An indicator by how many midi-ticks the song contents are shifted.
Grace beats at start might require a shift for the first beat to start at 0.
This information can be used to translate back the player time axis to the music notation. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly midiTickShift: number;double MidiTickShift { get; }val midiTickShift: DoubleplaybackRange​
The range of the song that should be played. Gets or sets the range of the song that should be played. The range is defined in midi ticks or the whole song is played if the range is set to null (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
playbackRange: PlaybackRange | null = null;PlaybackRange? PlaybackRange { get; set; } = nullvar playbackRange: PlaybackRange? = nullplaybackSpeed​
The current playback speed as percentage Controls the current playback speed as percentual value. Normal speed is 1.0 (100%) and 0.5 would be 50%. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
playbackSpeed: number = 1;double PlaybackSpeed { get; set; } = 1var playbackSpeed: Double = 1player​
The alphaSynth player used for playback. This is the low-level API to the Midi synthesizer used for playback.
Gets access to the underling IAlphaSynth that is used for the audio playback. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
playerState​
The current player state. Gets the current player state, meaning whether it is paused or playing. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
renderer​
The score renderer used for rendering the music sheet. This is the low-level API responsible for the actual rendering engine.
Gets access to the underling IScoreRenderer that is used for the rendering. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
score​
The score holding all information about the song being rendered (Inherited from AlphaTabApiBase )
settings​
The settings that are used for rendering the music notation. Gets access to the underling Settings object that is currently used by alphaTab. (Inherited from AlphaTabApiBase )
tickCache​
The tick cache allowing lookup of midi ticks to beats. Gets the tick cache allowing lookup of midi ticks to beats. If the player is enabled, a midi file will be generated
for the loaded Score for later playback. During this generation this tick cache is filled with the
exact midi ticks when beats are played.
The findBeat method allows a lookup of the beat related to a given input midi tick. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly tickCache: MidiTickLookup | null;MidiTickLookup? TickCache { get; }val tickCache: MidiTickLookup?tickPosition​
The position within the song in midi ticks. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
tickPosition: number;double TickPosition { get; set; }var tickPosition: DoubletimePosition​
The position within the song in milliseconds (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
timePosition: number;double TimePosition { get; set; }var timePosition: Doubletracks​
The list of the tracks that are currently rendered. (Inherited from AlphaTabApiBase )
uiFacade​
The UI facade used for interacting with the user interface (like the browser). The implementation depends on the platform alphaTab is running in (e.g. the web version in the browser, WPF in .net etc.) (Inherited from AlphaTabApiBase )
Methods​
applyPlaybackRangeFromHighlight​
Applies the playback range from the currently highlighted range. This method can be used when building custom selection systems (e.g. having draggable handles). (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
applyPlaybackRangeFromHighlight(): voidvoid ApplyPlaybackRangeFromHighlight()fun applyPlaybackRangeFromHighlight(): UnitchangeTrackMute​
Changes the given tracks to be muted or not. This will result in a muting of the primary and secondary midi channel that the track uses for playback. If the track shares the channels with another track, all tracks will be muted as during playback they cannot be distinguished.
changeTrackMute(tracks: Track[], mute: boolean): void| Parameter | Summary |
|---|---|
tracksAll | (no description) |
muteAll | (no description) |
changeTrackSolo​
Changes the given tracks to be played solo or not. If any track is set to solo, all other tracks are muted, unless they are also flagged as solo. This will result in a solo playback of the primary and secondary midi channel that the track uses for playback. If the track shares the channels with another track, all related tracks will be played as they cannot be distinguished.
changeTrackSolo(tracks: Track[], solo: boolean): void| Parameter | Summary |
|---|---|
tracksAll | (no description) |
soloAll | (no description) |
changeTrackTranspositionPitch​
Changes the pitch transpose applied to the given tracks. These pitches are additional to the ones applied to the song via the settings and data model and allows a more live-update via a UI. (Inherited from AlphaTabApiBase )
| Parameter | Summary |
|---|---|
tracksAll | The list of tracks to change. |
semitonesAll | The number of semitones to apply as pitch offset. |
changeTrackVolume​
Changes the volume of the given tracks. This will result in a volume change of the primary and secondary midi channel that the track uses for playback. If the track shares the channels with another track, all related tracks will be changed as they cannot be distinguished.
changeTrackVolume(tracks: Track[], volume: number): void| Parameter | Summary |
|---|---|
tracksAll | (no description) |
volumeAll | (no description) |
clearPlaybackRangeHighlight​
Clears the highlight markers marking the currently selected playback range. Unlike actually setting playbackRange this method only clears the selection markers without actually
changing the playback range. This method can be used when building custom selection systems (e.g. having draggable handles). (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
clearPlaybackRangeHighlight(): voidvoid ClearPlaybackRangeHighlight()fun clearPlaybackRangeHighlight(): Unitdestroy​
Destroys the alphaTab control and restores the initial state of the UI. This function destroys the alphaTab control and tries to restore the initial state of the UI. This might be useful if
our website is quite dynamic and you need to uninitialize alphaTab from an element again. After destroying alphaTab
it cannot be used anymore. Any further usage leads to unexpected behavior. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
destroy(): voidvoid Destroy()fun destroy(): UnitdownloadMidi​
Generates an SMF1.0 file and downloads it Generates a SMF1.0 compliant MIDI file of the currently loaded song and starts the download of it. Please be aware that SMF1.0 does not support bends per note which might result in wrong bend effects in case multiple bends are applied on the same beat (e.g. two notes bending or vibrato + bends).
downloadMidi(format?: MidiFileFormat): void| Parameter | Summary |
|---|---|
formatAll | (no description) |
enumerateOutputDevices​
Loads and lists the available output devices which can be used by the player. Will request permissions if needed.
The values provided, can be passed into setOutputDevice to change dynamically the output device on which
the sound is played.
In the web version this functionality relies on experimental APIs and might not yet be available in all browsers. https://caniuse.com/mdn-api_audiocontext_sinkid (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
enumerateOutputDevices(): Promise<ISynthOutputDevice[]>System.Threading.Task<IList<ISynthOutputDevice>> EnumerateOutputDevices()suspend fun enumerateOutputDevices(): alphaTab.collections.List<ISynthOutputDevice>Returns​
the list of available devices or an empty list if there are no permissions, or the player is not enabled.
exportAudio​
Starts the audio export for the currently loaded song. This will not export or use any backing track media but will always use the synthesizer to generate the output. This method works with any PlayerMode active but changing the mode during export can lead to unexpected side effects.
See Audio Export for further guidance how to use this feature. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
exportAudio(options: AudioExportOptions): Promise<IAudioExporter>System.Threading.Task<IAudioExporter> ExportAudio(AudioExportOptions options)suspend fun exportAudio(options: AudioExportOptions): IAudioExporter| Parameter | Summary |
|---|---|
optionsAll | The export options. |
Returns​
An exporter instance to export the audio in a streaming fashion.
getOutputDevice​
The currently configured output device if changed via setOutputDevice . Assumes setOutputDevice has been used.
In the web version this functionality relies on experimental APIs and might not yet be available in all browsers. https://caniuse.com/mdn-api_audiocontext_sinkid (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
getOutputDevice(): Promise<ISynthOutputDevice | null>System.Threading.Task<ISynthOutputDevice?> GetOutputDevice()suspend fun getOutputDevice(): ISynthOutputDevice?Returns​
The custom configured output device which was set via setOutputDevice or null
if the default outputDevice is used.
The output device might change dynamically if devices are connected/disconnected (e.g. bluetooth headset).
highlightPlaybackRange​
Places the highlight markers at the specified start and end-beat range. Unlike actually setting playbackRange this method only places the selection markers without actually
changing the playback range. This method can be used when building custom selection systems (e.g. having draggable handles). (Inherited from AlphaTabApiBase )
| Parameter | Summary |
|---|---|
startBeatAll | The start beat where the selection should start |
endBeatAll | The end beat where the selection should end. |
load​
Initiates a load of the score using the given data. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
load(scoreData: unknown, trackIndexes?: number[]): booleanbool Load(object scoreData, IList<double>? trackIndexes)fun load(scoreData: Any, trackIndexes: alphaTab.collections.DoubleList?): Boolean| Parameter | Summary |
|---|---|
scoreDataAll | The data container supported by
|
trackIndexesAll | The indexes of the tracks from the song that should be rendered. If not provided, the first track of the song will be shown. |
Returns​
true if the data object is supported and a load was initiated, otherwise false
loadMidiForScore​
Re-creates the midi for the current score and loads it. This will result in the player to stop playback. Some setting changes require re-genration of the midi song. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
loadMidiForScore(): voidvoid LoadMidiForScore()fun loadMidiForScore(): UnitloadSoundFont​
Triggers a load of the soundfont from the given data. AlphaTab only supports SoundFont2 and SoundFont3 since 1.4.0 encoded soundfonts for loading. To load a soundfont the player must be enabled in advance. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
loadSoundFont(data: unknown, append?: boolean): booleanbool LoadSoundFont(object data, bool? append)fun loadSoundFont(data: Any, append: Boolean?): Boolean| Parameter | Summary |
|---|---|
dataAll | The data object to decode. The supported data types is depending on the platform.
|
appendAll | Whether to fully replace or append the data from the given soundfont. |
Returns​
true if the passed in object is a supported format and loading was initiated, otherwise false.
loadSoundFontFromUrl​
Triggers a load of the soundfont from the given URL.
loadSoundFontFromUrl(url: string, append: boolean): void| Parameter | Summary |
|---|---|
urlAll | The URL from which to load the soundfont |
appendAll | Whether to fully replace or append the data from the given soundfont. |
pause​
Pauses the playback of the current song. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
pause(): voidvoid Pause()fun pause(): Unitplay​
Starts the playback of the current song. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
play(): booleanbool Play()fun play(): BooleanReturns​
true if the playback was started, otherwise false. Reasons for not starting can be that the player is not ready or already playing.
playBeat​
Triggers the play of the given beat. This will stop the any other current ongoing playback.
This method can be used in applications when individual beats need to be played for lesson or editor style purposes.
The player will not report any change in state or playback position during the playback of the requested beat.
It is a playback of audio separate to the main song playback. (Inherited from AlphaTabApiBase )
| Parameter | Summary |
|---|---|
beatAll | the single beat to play |
Returns​
true if the playback was started, otherwise false. Reasons for not starting can be that the player is not ready or already playing.
playNote​
Triggers the play of the given note. This will stop the any other current ongoing playback.
This method can be used in applications when individual notes need to be played for lesson or editor style purposes.
The player will not report any change in state or playback position during the playback of the requested note.
It is a playback of audio separate to the main song playback. (Inherited from AlphaTabApiBase )
| Parameter | Summary |
|---|---|
noteAll | the single note to play |
playPause​
Toggles between play/pause depending on the current player state. If the player was playing, it will pause. If it is paused, it will initiate a play. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
playPause(): voidvoid PlayPause()fun playPause(): Unitprint​
Opens a popup window with the rendered music notation for printing. Opens a popup window with the rendered music notation for printing. The default display of alphaTab in the browser is not very suitable for printing. The items are lazy loaded, the width can be dynamic, and the scale might be better suitable for screens. This function opens a popup window which is filled with a by-default A4 optimized view of the rendered score:
- Lazy loading is disabled
- The scale is reduced to 0.8
- The stretch force is reduced to 0.8
- The width is optimized to A4. Portrait if the page-layout is used, landscape if the horizontal-layout is used.
print(width?: string, additionalSettings?: unknown): void| Parameter | Summary |
|---|---|
widthAll | An optional custom width as CSS width that should be used. Best is to use a CSS width that is suitable for your preferred page size. |
additionalSettingsAll | An optional parameter to specify additional setting values which should be respected during printing (since 1.2.0) |
render​
Initiates a re-rendering of the current setup. If rendering is not yet possible, it will be deferred until the UI changes to be ready for rendering. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
render(renderHints?: RenderHints): voidvoid Render(RenderHints? renderHints)fun render(renderHints: RenderHints?): Unit| Parameter | Summary |
|---|---|
renderHintsAll | Additional hints to respect during layouting and rendering. |
renderScore​
Initiates a rendering of the given score. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
renderScore(score: Score, trackIndexes?: number[], renderHints?: RenderHints): voidvoid RenderScore(Score score, IList<double>? trackIndexes, RenderHints? renderHints)fun renderScore(score: Score, trackIndexes: alphaTab.collections.DoubleList?, renderHints: RenderHints?): Unit| Parameter | Summary |
|---|---|
scoreAll | The score containing the tracks to be rendered. |
trackIndexesAll | The indexes of the tracks from the song that should be rendered. If not provided, the first track of the song will be shown. |
renderHintsAll | Additional hints to respect during layouting and rendering. |
renderTracks​
Renders the given list of tracks. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
renderTracks(tracks: Track[], renderHints?: RenderHints): voidvoid RenderTracks(IList<Track> tracks, RenderHints? renderHints)fun renderTracks(tracks: alphaTab.collections.List<Track>, renderHints: RenderHints?): Unit| Parameter | Summary |
|---|---|
tracksAll | The tracks to render. They must all belong to the same score. |
renderHintsAll | Additional hints to respect during layouting and rendering. |
resetSoundFonts​
Unloads all presets from previously loaded SoundFonts. This function resets the player internally to not have any SoundFont loaded anymore. This allows you to reduce the memory usage of the page
if multiple partial SoundFonts are loaded via loadSoundFont(..., true). Depending on the workflow you might also just want to use loadSoundFont(..., false) once
instead of unloading the previous SoundFonts. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
resetSoundFonts(): voidvoid ResetSoundFonts()fun resetSoundFonts(): UnitscrollToCursor​
Initiates a scroll to the cursor. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
scrollToCursor(): voidvoid ScrollToCursor()fun scrollToCursor(): UnitsetOutputDevice​
Changes the output device which should be used for playing the audio (player must be enabled). Use enumerateOutputDevices to load the list of available devices.
In the web version this functionality relies on experimental APIs and might not yet be available in all browsers. https://caniuse.com/mdn-api_audiocontext_sinkid (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
setOutputDevice(device: ISynthOutputDevice | null): Promise<void>System.Threading.Task<void> SetOutputDevice(ISynthOutputDevice? device)suspend fun setOutputDevice(device: ISynthOutputDevice?): Unit| Parameter | Summary |
|---|---|
deviceAll | The output device to use, or null to switch to the default device. |
stop​
Stops the playback of the current song, and moves the playback position back to the start. If a dedicated playback range is selected, it will move the playback position to the start of this range, not the whole song. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
stop(): voidvoid Stop()fun stop(): Unittex​
Tells alphaTab to render the given alphaTex.
tex(tex: string, tracks?: number[] | 'all'): void| Parameter | Summary |
|---|---|
texAll | (no description) |
tracksAll | (no description) |
updateSettings​
Applies any changes that were done to the settings object. It also informs the renderer about any new values to consider.
By default alphaTab will not trigger any re-rendering or settings update just if the settings object itself was changed. This method must be called
to trigger an update of the settings in all components. Then a re-rendering can be initiated using the render method. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
updateSettings(): voidvoid UpdateSettings()fun updateSettings(): UnitupdateSyncPoints​
Triggers an update of the sync points for the current score after modification within the data model (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
updateSyncPoints(): voidvoid UpdateSyncPoints()fun updateSyncPoints(): UnitEvents​
activeBeatsChanged​
This event is fired when the currently active beats across all tracks change. Unlike the playedBeatChanged event this event contains the beats of all tracks and voices independent of them being rendered.
This event is fired when the currently active beats across all tracks change. Unlike the playedBeatChanged event this event contains the beats of all tracks and voices independent of them being rendered. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly activeBeatsChanged: IEventEmitterOfT<ActiveBeatsChangedEventArgs>;IEventEmitterOfT<ActiveBeatsChangedEventArgs> ActiveBeatsChanged { get; }val activeBeatsChanged: IEventEmitterOfT<ActiveBeatsChangedEventArgs>beatMouseDown​
This event is fired whenever a the user presses the mouse button on a beat.
This event is fired whenever a the user presses the mouse button on a beat. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly beatMouseDown: IEventEmitterOfT<Beat>;IEventEmitterOfT<Beat> BeatMouseDown { get; }val beatMouseDown: IEventEmitterOfT<Beat>beatMouseMove​
This event is fired whenever the user moves the mouse over a beat after the user already pressed the button on a beat.
This event is fired whenever the user moves the mouse over a beat after the user already pressed the button on a beat. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly beatMouseMove: IEventEmitterOfT<Beat>;IEventEmitterOfT<Beat> BeatMouseMove { get; }val beatMouseMove: IEventEmitterOfT<Beat>beatMouseUp​
This event is fired whenever the user releases the mouse after a mouse press on a beat. This event is fired regardless of whether the mouse was released on a beat. The parameter is null if the mouse was released somewhere beside the beat.
This event is fired whenever the user releases the mouse after a mouse press on a beat. This event is fired regardless of whether the mouse was released on a beat.
The parameter is null if the mouse was released somewhere beside the beat. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly beatMouseUp: IEventEmitterOfT<Beat | null>;IEventEmitterOfT<Beat?> BeatMouseUp { get; }val beatMouseUp: IEventEmitterOfT<Beat?>error​
This event is fired when an error within alphatab occurred. This event is fired when an error within alphatab occurred. Use this event as global error handler to show errors to end-users. Due to the asynchronous nature of alphaTab, no call to the API will directly throw an error if it fails. Instead a signal to this error handlers will be sent.
This event is fired when an error within alphatab occurred. This event is fired when an error within alphatab occurred. Use this event as global error handler to show errors
to end-users. Due to the asynchronous nature of alphaTab, no call to the API will directly throw an error if it fails.
Instead a signal to this error handlers will be sent. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly error: IEventEmitterOfT<Error>;IEventEmitterOfT<System.Exception> Error { get; }val error: IEventEmitterOfT<kotlin.Throwable>midiEventsPlayed​
This event is fired when the synthesizer played certain midi events. This event is fired when the synthesizer played certain midi events. This allows reacing on various low level audio playback elements like notes/rests played or metronome ticks.
Refer to the related guide to learn more about this feature.
Also note that the provided data models changed significantly in {@version 1.3.0}. We try to provide backwards compatibility
until some extend but highly encourage changing to the new models in case of problems.
This event is fired when the synthesizer played certain midi events. This event is fired when the synthesizer played certain midi events. This allows reacing on various low level audio playback elements like notes/rests played or metronome ticks.
Refer to the related guide to learn more about this feature.
Also note that the provided data models changed significantly in {@version 1.3.0}. We try to provide backwards compatibility
until some extend but highly encourage changing to the new models in case of problems. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly midiEventsPlayed: IEventEmitterOfT<MidiEventsPlayedEventArgs>;IEventEmitterOfT<MidiEventsPlayedEventArgs> MidiEventsPlayed { get; }val midiEventsPlayed: IEventEmitterOfT<MidiEventsPlayedEventArgs>midiLoad​
This event is fired when a Midi file is being loaded. This event is fired when a Midi file for the song was generated and is being loaded by the synthesizer. This event can be used to inspect or modify the midi events which will be played for the song. This can be used to generate other visual representations of the song.
The generated midi file will NOT contain any metronome and count-in related events. The metronome and count-in ticks are handled within the synthesizer.
This event is fired when a Midi file is being loaded. This event is fired when a Midi file for the song was generated and is being loaded by the synthesizer. This event can be used to inspect or modify the midi events which will be played for the song. This can be used to generate other visual representations of the song.
The generated midi file will NOT contain any metronome and count-in related events. The metronome and
count-in ticks are handled within the synthesizer. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly midiLoad: IEventEmitterOfT<MidiFile>;IEventEmitterOfT<MidiFile> MidiLoad { get; }val midiLoad: IEventEmitterOfT<MidiFile>midiLoaded​
This event is fired when the Midi file needed for playback was loaded.
This event is fired when the Midi file needed for playback was loaded. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly midiLoaded: IEventEmitterOfT<PositionChangedEventArgs>;IEventEmitterOfT<PositionChangedEventArgs> MidiLoaded { get; }val midiLoaded: IEventEmitterOfT<PositionChangedEventArgs>noteMouseDown​
This event is fired whenever a the user presses the mouse button on a note head/number. This event is fired whenever a the user presses the mouse button on a note.
It is only fired if CoreSettings.includeNoteBounds was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in boundsLookup .
This event is fired whenever a the user presses the mouse button on a note head/number. This event is fired whenever a the user presses the mouse button on a note.
It is only fired if CoreSettings.includeNoteBounds was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in boundsLookup . (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly noteMouseDown: IEventEmitterOfT<Note>;IEventEmitterOfT<Note> NoteMouseDown { get; }val noteMouseDown: IEventEmitterOfT<Note>noteMouseMove​
This event is fired whenever the user moves the mouse over a note after the user already pressed the button on a note. This event is fired whenever the user moves the mouse over a note after the user already pressed the button on a note.
It is only fired if CoreSettings.includeNoteBounds was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in boundsLookup
This event is fired whenever the user moves the mouse over a note after the user already pressed the button on a note. This event is fired whenever the user moves the mouse over a note after the user already pressed the button on a note.
It is only fired if CoreSettings.includeNoteBounds was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in boundsLookup (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly noteMouseMove: IEventEmitterOfT<Note>;IEventEmitterOfT<Note> NoteMouseMove { get; }val noteMouseMove: IEventEmitterOfT<Note>noteMouseUp​
This event is fired whenever the user releases the mouse after a mouse press on a note. This event is fired whenever a the user presses the mouse button on a note.
This event is fired regardless of whether the mouse was released on a note.
The parameter is null if the mouse was released somewhere beside the note.
It is only fired if CoreSettings.includeNoteBounds was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in the boundsLookup .
This event is fired whenever the user releases the mouse after a mouse press on a note. This event is fired whenever a the user presses the mouse button on a note.
This event is fired regardless of whether the mouse was released on a note.
The parameter is null if the mouse was released somewhere beside the note.
It is only fired if CoreSettings.includeNoteBounds was set to true because
only then this hit detection can be done. A click on a note is considered if the note head or the note number on tabs are clicked as documented in the boundsLookup . (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly noteMouseUp: IEventEmitterOfT<Note | null>;IEventEmitterOfT<Note?> NoteMouseUp { get; }val noteMouseUp: IEventEmitterOfT<Note?>playbackRangeChanged​
This event is fired when the playback range changed.
This event is fired when the playback range changed. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playbackRangeChanged: IEventEmitterOfT<PlaybackRangeChangedEventArgs>;IEventEmitterOfT<PlaybackRangeChangedEventArgs> PlaybackRangeChanged { get; }val playbackRangeChanged: IEventEmitterOfT<PlaybackRangeChangedEventArgs>playbackRangeHighlightChanged​
This event is fired the shown highlights for the selected playback range changes. This event is fired already during selection and not only when the selection is completed. This event can be used to place additional custom selection markers (like drag handles).
This event is fired the shown highlights for the selected playback range changes. This event is fired already during selection and not only when the selection is completed.
This event can be used to place additional custom selection markers (like drag handles). (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playbackRangeHighlightChanged: IEventEmitterOfT<PlaybackHighlightChangeEventArgs>;IEventEmitterOfT<PlaybackHighlightChangeEventArgs> PlaybackRangeHighlightChanged { get; }val playbackRangeHighlightChanged: IEventEmitterOfT<PlaybackHighlightChangeEventArgs>playedBeatChanged​
This event is fired when the played beat changed.
This event is fired when the played beat changed. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playedBeatChanged: IEventEmitterOfT<Beat>;IEventEmitterOfT<Beat> PlayedBeatChanged { get; }val playedBeatChanged: IEventEmitterOfT<Beat>playerFinished​
This event is fired when the playback of the whole song finished. This event is finished regardless on whether looping is enabled or not.
This event is fired when the playback of the whole song finished. This event is finished regardless on whether looping is enabled or not. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playerFinished: IEventEmitter;IEventEmitter PlayerFinished { get; }val playerFinished: IEventEmitterplayerPositionChanged​
This event is fired when the current playback position of the song changed.
This event is fired when the current playback position of the song changed. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playerPositionChanged: IEventEmitterOfT<PositionChangedEventArgs>;IEventEmitterOfT<PositionChangedEventArgs> PlayerPositionChanged { get; }val playerPositionChanged: IEventEmitterOfT<PositionChangedEventArgs>playerReady​
This event is fired when all required data for playback is loaded and ready. This event is fired when all required data for playback is loaded and ready. The player is ready for playback when all background workers are started, the audio output is initialized, a soundfont is loaded, and a song was loaded into the player as midi file.
This event is fired when all required data for playback is loaded and ready. This event is fired when all required data for playback is loaded and ready. The player is ready for playback when
all background workers are started, the audio output is initialized, a soundfont is loaded, and a song was loaded into the player as midi file. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playerReady: IEventEmitter;IEventEmitter PlayerReady { get; }val playerReady: IEventEmitterplayerStateChanged​
This event is fired when the playback state changed.
This event is fired when the playback state changed. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly playerStateChanged: IEventEmitterOfT<PlayerStateChangedEventArgs>;IEventEmitterOfT<PlayerStateChangedEventArgs> PlayerStateChanged { get; }val playerStateChanged: IEventEmitterOfT<PlayerStateChangedEventArgs>postRenderFinished​
This event is fired when the rendering of the whole music sheet is finished, and all handlers of renderFinished ran. If CoreSettings.enableLazyLoading is enabled not all partial images of the music sheet might be rendered.
In this case the renderFinished event rather represents that the whole music sheet has been layouted and arranged
and every partial image can be requested for rendering. If you neeed more fine-grained access
to the actual layouting and rendering progress, you need to look at the low-level apis partialLayoutFinished and
partialRenderFinished accessible via renderer .
This event is fired when the rendering of the whole music sheet is finished, and all handlers of renderFinished ran. If CoreSettings.enableLazyLoading is enabled not all partial images of the music sheet might be rendered.
In this case the renderFinished event rather represents that the whole music sheet has been layouted and arranged
and every partial image can be requested for rendering. If you neeed more fine-grained access
to the actual layouting and rendering progress, you need to look at the low-level apis partialLayoutFinished and
partialRenderFinished accessible via renderer . (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly postRenderFinished: IEventEmitter;IEventEmitter PostRenderFinished { get; }val postRenderFinished: IEventEmitterrenderFinished​
This event is fired when the rendering of the whole music sheet is finished. This event is fired when the rendering of the whole music sheet is finished from the render engine side. There might be still tasks open for the display component to visually display the rendered components when this event is notified (e.g. resizing of DOM elements are done).
This event is fired when the rendering of the whole music sheet is finished. This event is fired when the rendering of the whole music sheet is finished from the render engine side. There might be still tasks open for
the display component to visually display the rendered components when this event is notified (e.g. resizing of DOM elements are done). (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly renderFinished: IEventEmitterOfT<RenderFinishedEventArgs>;IEventEmitterOfT<RenderFinishedEventArgs> RenderFinished { get; }val renderFinished: IEventEmitterOfT<RenderFinishedEventArgs>renderStarted​
This event is fired when the rendering of the whole music sheet is starting. All preparations are completed and the layout and render sequence is about to start.
This event is fired when the rendering of the whole music sheet is starting. All preparations are completed and the layout and render sequence is about to start. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly renderStarted: IEventEmitterOfT<boolean>;IEventEmitterOfT<bool> RenderStarted { get; }val renderStarted: IEventEmitterOfT<Boolean>resize​
This event is fired when alphaTab was resized and is about to rerender the music notation. This event is fired when alphaTab was resized and is about to rerender the music notation. Before the re-rendering on resize the settings will be updated in the related components. This means that any changes to the layout options or other display settings are considered. This allows to implement scenarios where maybe the scale or the layout mode dynamically changes along the resizing.
This event is fired when alphaTab was resized and is about to rerender the music notation. This event is fired when alphaTab was resized and is about to rerender the music notation. Before the re-rendering on resize
the settings will be updated in the related components. This means that any changes to the layout options or other display settings are
considered. This allows to implement scenarios where maybe the scale or the layout mode dynamically changes along the resizing. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly resize: IEventEmitterOfT<ResizeEventArgs>;IEventEmitterOfT<ResizeEventArgs> Resize { get; }val resize: IEventEmitterOfT<ResizeEventArgs>scoreLoaded​
This event is fired whenever a new song is loaded. This event is fired whenever a new song is loaded or changing due to renderScore or renderTracks calls.
It is fired after the transposition midi pitches from the settings were applied, but before any midi is generated or rendering is started.
This allows any modification of the score before further processing.
This event is fired whenever a new song is loaded. This event is fired whenever a new song is loaded or changing due to renderScore or renderTracks calls.
It is fired after the transposition midi pitches from the settings were applied, but before any midi is generated or rendering is started.
This allows any modification of the score before further processing. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly scoreLoaded: IEventEmitterOfT<Score>;IEventEmitterOfT<Score> ScoreLoaded { get; }val scoreLoaded: IEventEmitterOfT<Score>settingsUpdated​
This event is fired when a settings update was requested.
This event is fired when a settings update was requested. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly settingsUpdated: IEventEmitter;IEventEmitter SettingsUpdated { get; }val settingsUpdated: IEventEmittersoundFontLoad​
This event is fired when the SoundFont is being loaded. This event is fired when the SoundFont is being loaded and reports the progress accordingly.
This event is fired when the SoundFont is being loaded. This event is fired when the SoundFont is being loaded and reports the progress accordingly.
readonly soundFontLoad: IEventEmitterOfT<ProgressEventArgs>;soundFontLoaded​
This event is fired when the SoundFont needed for playback was loaded.
This event is fired when the SoundFont needed for playback was loaded. (Inherited from AlphaTabApiBase )
- JavaScript
- C#
- Kotlin
readonly soundFontLoaded: IEventEmitter;IEventEmitter SoundFontLoaded { get; }val soundFontLoaded: IEventEmitter