activeBeatsChanged
Description​
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.
activeBeatsChangedJavaScript |
alphaTab.activeBeatsChangedjQuery |
alphaTab.activeBeatsChangedHTML |
ActiveBeatsChanged.net |
activeBeatsChangedAndroid |
Types​
function(activeBeatsChangedEventArgs)JavaScript |
Action<AlphaTab.Synth.ActiveBeatsChangedEventArgs>.net |
(args : AlphaTab.Synth.ActiveBeatsChangedEventArgs) -> UnitAndroid |
Parameters​
Parameters | Type | Summary |
---|---|---|
beatJavaScript | alphaTab.synth.ActiveBeatsChangedEventArgs | The event args containing the info about the active beats. |
beat.net | AlphaTab.Synth.ActiveBeatsChangedEventArgs | The event args containing the info about the active beats. |
beatAndroid | alphaTab.synth.ActiveBeatsChangedEventArgs | The event args containing the info about the active beats. |
ActiveBeatsChangedEventArgs Properties​
Parameters | Type | Summary |
---|---|---|
activeBeatsJavaScript | alphaTab.model.Beat[] | The currently active beats across all tracks and voices. |
ActiveBeats.net | IList<AlphaTab.Model.Beat> | The currently active beats across all tracks and voices. |
activeBeatsAndroid | alphaTab.collections.List<alphaTab.model.Beat> | The currently active beats across all tracks and voices. |
Examples​
- JavaScript
- HTML
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.activeBeatsChanged.on(args => {
updateHighlights(args.activeBeats);
});
$('#alphaTab').on('alphaTab.activeBeatsChanged', (e, args) => {
updateHighlights(args.activeBeats);
});
document.querySelector('#alphaTab').addEventListener('alphaTab.activeBeatsChanged', (e) => {
const args = e.detail;
updateHighlights(args.activeBeats);
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.ActiveBeatsChanged.On(args =>
{
UpdateHighlights(args.ActiveBeats);
});
val api = AlphaTabApi<MyControl>(...)
api.activeBeatsChanged.on { args ->
updateHighlights(args.activeBeats)
}