uvi-script
Musical event scripting with Lua
AsyncMidiFileLoadTask Class Reference

An Asynchronous task that loads a MIDI file. More...

Inheritance diagram for AsyncMidiFileLoadTask:
AsyncTask

Public Attributes

MidiSequence & midi
 the MidiSequence, nil if the file could not be parsed.
 
- Public Attributes inherited from AsyncTask
int id
 unique identifier for this task
 
bool finished
 a flag to indicate whether the task has been completed. Also true after the task was cancelled: check success or state.
 
float progress
 a value between 0 and 1 to be notified of the task's progress.
 
bool success
 a flag to indicate whether the task has been successful.
 
string state
 a string to indicate the current task state (pending | running | finished | cancelled)
 

Additional Inherited Members

- Public Member Functions inherited from AsyncTask
void cancel ()
 notify the task that it should be cancelled.
 

Detailed Description

An Asynchronous task that loads a MIDI file.

Load a MIDI file inside a MidiSequence asynchronously. Tasks returned by loadMidi() and createMidiFile() both expose the sequence through the midi property.

Member Data Documentation

◆ midi

MidiSequence& AsyncMidiFileLoadTask::midi

the MidiSequence, nil if the file could not be parsed.

success only tells that the file was found: it is true for an existing file that is not a valid MIDI file, in which case midi is nil. Check midi before using it.