midiLoad
Description
This event is fired when a Midi file for the song was generated and is being loaded by the synthesizer. This event can be used to inspect or modify the midi events which will be played for the song. This can be used to generate other visual representations of the song.
note
The generated midi file will NOT contain any metronome and count-in related events. The metronome and count-in ticks are handled within the synthesizer.
midiLoadJavaScript |
alphaTab.midiLoadjQuery |
alphaTab.midiLoadHTML |
MidiLoad.net |
Types
function(midiFile)JavaScript |
Action<MidiFile>.net |
Parameters
Parameters | Type | Summary |
---|---|---|
midiFileAll | alphaTab.midi.MidiFile | The midi file containing all events which will be synthesized. |
MidiFile Properties
Examples
- JavaScript
- HTML
- jQuery
- C#
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.midiLoad.on(file => {
initializePianoPractice(file);
});
$('#alphaTab').on('alphaTab.midiLoad', (e) => {
const file = e.detail;
initializePianoPractice(file);
});
document.querySelector('#alphaTab').addEventListener('alphaTab.midiLoad', e => {
const file = e.detail;
initializePianoPractice(file);
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.MidiLoad.On(file =>
{
InitializePianoPractice(file);
});