tickCache
tickCacheJavaScript
TickCache.net
tickCacheAndroid
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.
- JavaScript
- C#
- Kotlin
readonly tickCache: MidiTickLookup | null;
MidiTickLookup? TickCache { get; }
val tickCache: MidiTickLookup?
Examples​
- JavaScript
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
const lookupResult = api.tickCache.findBeat(new Set([0, 1]), 100);
const currentBeat = lookupResult?.currentBeat;
var api = new AlphaTabApi<MyControl>(...);
var lookupResult = api.TickCache.FindBeat(new AlphaTab.Core.EcmaScript.Set(0, 1), 100);
var currentBeat = lookupResult?.CurrentBeat;
val api = AlphaTabApi<MyControl>(...)
val lookupResult = api.tickCache.findBeat(alphaTab.core.ecmaScript.Set(0, 1), 100);
val currentBeat = lookupResult?.CurrentBeat;