public BankSfz(BnkFile aBnkFile, string aPathWaveform) : base() { Dictionary <string, string> lPathWaveformDictionary = GetWaveformPathDictionary(aPathWaveform); for (int i = 0; i < aBnkFile.pathSfzList.Count; i++) { FileStream lFileStream = new FileStream(aBnkFile.pathSfzList[i], FileMode.Open, FileAccess.Read); SfzFile lSfzFile = new SfzFile(lFileStream); instrumentArray[i] = new InstrumentSfz(lSfzFile, lPathWaveformDictionary); } }
public InstrumentSfz(SfzFile aSfzFile, Dictionary <string, string> aPathWaveformDictionary) : base() { List <SoundfontBase> lSoundfontList = new List <SoundfontBase>(); for (int i = 0; i < aSfzFile.sfzRegionList.Count; i++) { SfzRegion lSfzData = aSfzFile.sfzRegionList[i]; lSoundfontList.Add(new SoundfontSfz(lSfzData, aPathWaveformDictionary)); } AddSoundfont(lSoundfontList); }
public InstrumentSfz(SfzFile aSfzFile) : base() { List <SoundfontBase> lSoundfontList = new List <SoundfontBase>(); for (int i = 0; i < aSfzFile.sfzRegionList.Count; i++) { SfzRegion lSfzData = aSfzFile.sfzRegionList[i]; lSoundfontList.Add(new SoundfontSfz(lSfzData)); } AddSoundfont(lSoundfontList); }
public BankSfz(BnkFile aBnkFile) : base() { for (int i = 0; i < aBnkFile.pathSfzArray.Length; i++) { if (aBnkFile.pathSfzArray[i] != null) { using (FileStream uFileStream = new FileStream(aBnkFile.pathSfzArray[i], FileMode.Open, FileAccess.Read)) { Logger.Debug(aBnkFile.pathSfzArray[i]); SfzFile lSfzFile = new SfzFile(uFileStream); instrumentArray[i] = new InstrumentSfz(lSfzFile); } } } }