playBeat
Description​
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.
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.
Examples​
- JavaScript
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.playBeat(api.score.tracks[0].staves[0].bars[0].voices[0].beats[0]);
var api = new AlphaTabApi<MyControl>(...);
api.PlayBeat(api.Score.Tracks[0].Staves[0].Bars[0].Voices[0].Beats[0]);
val api = AlphaTabApi<MyControl>(...)
api.playBeat(api.score.tracks[0].staves[0].bars[0].voices[0].beats[0])