Skip to content

Latest commit

 

History

History
56 lines (50 loc) · 2.42 KB

File metadata and controls

56 lines (50 loc) · 2.42 KB
title activeBeatsChanged
sidebar_custom_props
kind category since
event
Events - Player
1.2.3

import { Tabs, TabItem, CodeBadge, SinceBadge, DynHeading, Link, Signature } from '@site/src/reference-commons'

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.

<Signature style="block" js={[["keyword","readonly"],["whitespace"," "],["identifier","activeBeatsChanged"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","ActiveBeatsChangedEventArgs","/docs/reference/types/synth/activebeatschangedeventargs"],["token",">"],["token",";"]]} csharp={[["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","ActiveBeatsChangedEventArgs","/docs/reference/types/synth/activebeatschangedeventargs"],["token",">"],["whitespace"," "],["identifier","ActiveBeatsChanged"],["whitespace"," "],["token","{"],["whitespace"," "],["keyword","get"],["token",";"],["whitespace"," "],["token","}"]]} kotlin={[["keyword","val"],["whitespace"," "],["identifier","activeBeatsChanged"],["token",":"],["whitespace"," "],["identifier","IEventEmitterOfT","/docs/reference/types/ieventemitteroft"],["token","<"],["identifier","ActiveBeatsChangedEventArgs","/docs/reference/types/synth/activebeatschangedeventargs"],["token",">"]]} />

Examples

<Tabs defaultValue="javascript" values={[ { label: "JavaScript", value: "javascript"}, { label: "C#", value: "csharp"}, { label: "Android", value: "android"} ]}

```js const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab')); api.activeBeatsChanged.on(args => { updateHighlights(args.activeBeats); }); ``` ```cs var api = new AlphaTabApi(...); api.ActiveBeatsChanged.On(args => { UpdateHighlights(args.ActiveBeats); }); ``` ```kotlin val api = AlphaTabApi(...) api.activeBeatsChanged.on { args -> updateHighlights(args.activeBeats) } ```