Skip to main content

tickCache

since 1.2.3
tickCacheJavaScriptTickCache.nettickCacheAndroid

Description​

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.

readonly tickCache: MidiTickLookup | null;

Examples​

const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
const lookupResult = api.tickCache.findBeat(new Set([0, 1]), 100);
const currentBeat = lookupResult?.currentBeat;