Skip to main content

core.includeNoteBounds

since 0.9.6

Description​

AlphaTab collects the position of the rendered music notation elements during the rendering process. This way some level of interactivity can be provided like the feature that seeks to the corresponding position when clicking on a beat. By default the position of the individual notes is not collected due to performance reasons. If access to note position information is needed, this setting can enable it.

core.includeNoteBoundsJavaScript
includeNoteBoundsJavaScript
core.includeNoteBoundsJSON
includeNoteBoundsJSON
data-core-includenoteboundsHTML
data-includenoteboundsHTML
Core.IncludeNoteBounds.net
core.includeNoteBoundsAndroid

Types​

boolAll

Default Value​

false

Example - JavaScript​

const settings = {
core: {
includeNoteBounds: true
}
};
let api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'), settings);
api.renderFinished.on(function() {
var lookup = api.renderer.boundsLookup;
var x = 100;
var y = 100;
var beat = lookup.getBeatAtPos(x, y);
var note = lookup.getNoteAtPos(beat, x, y);
});