create static method
Implementation
static List<Instrument> create(List<InstrumentInfo> infos, List<Zone> zones, List<SampleHeader> samples) {
if (infos.length <= 1) {
throw "No valid instrument was found.";
}
// The last one is the terminator.
int count = infos.length - 1;
List<Instrument> instruments = [];
for (var i = 0; i < count; i++) {
instruments.add(Instrument.fromInfo(infos[i], zones, samples));
}
return instruments;
}