createTracks method
Creates tracks in the underlying sequencer engine.
Implementation
Future<List<Track>> createTracks(List<Instrument> instruments) async {
if (globalState.isEngineReady) {
return _createTracks(instruments);
} else {
final completer = Completer<List<Track>>.sync();
globalState.onEngineReady(() async {
final tracks = await _createTracks(instruments);
completer.complete(tracks);
});
return completer.future;
}
}