Skip to main content

load

since 0.9.4

Description

This function initiates a load of the score using the given data. The supported types is depending on the platform.

Signatures

TypeValues
function load(score)JavaScriptLoad the given score object
function load(score, trackIndexes)JavaScriptLoad the given score object
function load(arrayBuffer)JavaScriptLoad the score from the given raw bytes using the available score loaders
function load(arrayBuffer, trackIndexes)JavaScriptLoad the score from the given raw bytes using the available score loaders
function load(uint8array)JavaScriptLoad the score from the given raw bytes using the available score loaders
function load(uint8array, trackIndexes)JavaScriptLoad the score from the given raw bytes using the available score loaders
function load(url)JavaScriptLoad the score from the given URL via Ajax using the available score loaders
function load(url, trackIndexes)JavaScriptLoad the score from the given URL via Ajax using the available score loaders
alphaTab('load', score)jQueryLoad the given score object
alphaTab('load', score, trackIndexes)jQueryLoad the given score object
alphaTab('load', arraybuffer)jQueryLoad the score from the given raw bytes using the available score loaders
alphaTab('load', arraybuffer, trackIndexes)jQueryLoad the score from the given raw bytes using the available score loaders
alphaTab('load', uint8array)jQueryLoad the score from the given raw bytes using the available score loaders
alphaTab('load', uint8array, trackIndexes)jQueryLoad the score from the given raw bytes using the available score loaders
alphaTab('load', url)jQueryLoad the score from the given URL via Ajax using the available score loaders
alphaTab('load', url, trackIndexes)jQueryLoad the score from the given URL via Ajax using the available score loaders
bool Load(Score score).netLoad the given score object
bool Load(Score score, int[] trackIndexes).netLoad the given score object
bool Load(byte[] raw).netLoad the score from the given raw bytes using the available score loaders
bool Load(byte[] raw, int[] trackIndexes).netLoad the score from the given raw bytes using the available score loaders
bool Load(Stream raw).netLoad the score from the given stream using the available score loaders
bool Load(Stream raw, int[] trackIndexes).netLoad the score from the given stream using the available score loaders

Parameters

ParametersTypeSummary
arraybufferJavaScript & jQueryArrayBuffer

The arraybuffer containing the raw bytes of a file supported by the score loaders

uint8arrayJavaScript & jQueryUint8Array

The Uint8Array containing the raw bytes of a file supported by the score loaders

trackIndexesAllint[]

A indexes of the tracks that should be rendered after the track is loaded. If not supplied, the first song will be rendered.

score.netAlphaTab.Model.Score

The score object to load.

raw.netbyte[]

The raw bytes containing a file supported by the score loaders.

raw.netSystem.IO.Stream

The stream containing a file supported by the score loaders.

Returns

true if the passed in object is a supported format and loading was initiated, otherwise false.

Examples

var api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.load('/assets/MyFile.gp');
$('#alphaTab').alphaTab('load', '/assets/MyFile.gp');
var api = new AlphaTabApi<MyControl>(...);
api.Load(System.IO.File.OpenRead("MyFile.gp"));