load
Description​
This function initiates a load of the score using the given data. The supported types is depending on the platform.
Signatures​
Type | Values |
---|---|
function load(score)JavaScript | Load the given score object |
function load(score, trackIndexes)JavaScript | Load the given score object |
function load(arrayBuffer)JavaScript | Load the score from the given raw bytes using the available score loaders |
function load(arrayBuffer, trackIndexes)JavaScript | Load the score from the given raw bytes using the available score loaders |
function load(uint8array)JavaScript | Load the score from the given raw bytes using the available score loaders |
function load(uint8array, trackIndexes)JavaScript | Load the score from the given raw bytes using the available score loaders |
function load(url)JavaScript | Load the score from the given URL via Ajax using the available score loaders |
function load(url, trackIndexes)JavaScript | Load the score from the given URL via Ajax using the available score loaders |
alphaTab('load', score)jQuery | Load the given score object |
alphaTab('load', score, trackIndexes)jQuery | Load the given score object |
alphaTab('load', arraybuffer)jQuery | Load the score from the given raw bytes using the available score loaders |
alphaTab('load', arraybuffer, trackIndexes)jQuery | Load the score from the given raw bytes using the available score loaders |
alphaTab('load', uint8array)jQuery | Load the score from the given raw bytes using the available score loaders |
alphaTab('load', uint8array, trackIndexes)jQuery | Load the score from the given raw bytes using the available score loaders |
alphaTab('load', url)jQuery | Load the score from the given URL via Ajax using the available score loaders |
alphaTab('load', url, trackIndexes)jQuery | Load the score from the given URL via Ajax using the available score loaders |
bool Load(Score score).net | Load the given score object |
bool Load(Score score, int[] trackIndexes).net | Load the given score object |
bool Load(byte[] raw).net | Load the score from the given raw bytes using the available score loaders |
bool Load(byte[] raw, int[] trackIndexes).net | Load the score from the given raw bytes using the available score loaders |
bool Load(Stream raw).net | Load the score from the given stream using the available score loaders |
bool Load(Stream raw, int[] trackIndexes).net | Load the score from the given stream using the available score loaders |
fun load(score: Score, trackIndexes: alphaTab.collections.DoubleList? = null)Android | Load the given score object |
fun load(raw: ByteArray, trackIndexes: alphaTab.collections.DoubleList? = null)Android | Load the score from the given raw bytes using the available score loaders |
fun load(raw: UByteArray, trackIndexes: alphaTab.collections.DoubleList? = null)Android | Load the score from the given raw bytes using the available score loaders |
fun load(stream: java.io.InputStream, trackIndexes: alphaTab.collections.DoubleList? = null)Android | Load the score from the given strean using the available score loaders |
Parameters​
Parameters | Type | Summary |
---|---|---|
arraybufferJavaScript & jQuery | ArrayBuffer | The arraybuffer containing the raw bytes of a file supported by the score loaders |
uint8arrayJavaScript & jQuery | Uint8Array | The Uint8Array containing the raw bytes of a file supported by the score loaders |
trackIndexesAll | int[] | A indexes of the tracks that should be rendered after the track is loaded. If not supplied, the first song will be rendered. |
score.net | AlphaTab.Model.Score | The score object to load. |
raw.net | byte[] | The raw bytes containing a file supported by the score loaders. |
raw.net | System.IO.Stream | The stream containing a file supported by the score loaders. |
scoreAndroid | alphaTab.model.Score | The score object to load. |
rawAndroid | ByteArray | The raw bytes containing a file supported by the score loaders. |
rawAndroid | UByteArray | The raw bytes containing a file supported by the score loaders. |
streamAndroid | java.io.InputStream | 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​
- JavaScript
- jQuery
- C#
- Android
const 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"));
val api = AlphaTabApi<MyControl>(...)
contentResolver.openInputStream(uri).use {
api.load(it)
}