예제 #1
0
        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);
        }
예제 #2
0
        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");
        }
예제 #3
0
 public static void SetSoundcluster(string aPathFile)
 {
     soundcluster = LoaderSoundcluster.Load(aPathFile);
 }