public static SoundclusterBase Load(string aPath) { SoundclusterBase lBank = null; string lExtension = Path.GetExtension(aPath).ToLower(); FileStream lFileStream = new FileStream(aPath, FileMode.Open, FileAccess.Read); switch (lExtension) { case ".txt": lBank = new SoundclusterSfz(new BlstFile(lFileStream)); break; case ".dls": lBank = new SoundclusterDls(new RiffFile(lFileStream)); break; case ".sf2": lBank = new SoundclusterSfbk(new RiffFile(lFileStream)); break; default: break; } return(lBank); }
static MidiGenerator() { //lSoundfontFile = "Sound/Soundfont/Sfz/Bank/MandolinOrchestra.blst.txt"; //string lSoundfontFile = "/Users/nagi/Google ドライブ/Soundline/Sfz/BankList/Standard.blst.txt"; //string lSoundfontFile = "/Users/nagi/Google ドライブ/Soundline/Sfz/BankList/Original.blst.txt"; //lSoundfontFile = "Sound/Soundfont/gm.dls"; //lSoundfontFile = "Sound/Soundfont/msgs.sf2"; //soundcluster = LoaderSoundcluster.Load( UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/gm.dls" ); //soundcluster = LoaderSoundcluster.Load( UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/msgs.sf2" ); soundcluster = LoaderSoundcluster.Load(UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/Original.blst.txt"); }
public static void SetSoundcluster(string aPathFile) { soundcluster = LoaderSoundcluster.Load(aPathFile); }