Esempio n. 1
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 = ConstructorCollection.ConstructSoundcluster( UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/Sfz/Standard.blst" );

            string lFilePath = "";

            using (FileStream uFileStream = new FileStream(UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/Soundfont.txt", FileMode.Open, FileAccess.Read))
            {
                using (StreamReader u = new StreamReader(uFileStream))
                {
                    for (string lLine = u.ReadLine(); lLine != null; lLine = u.ReadLine())
                    {
                        if (lLine != "" && lLine.IndexOf("//") != 0)
                        {
                            if (lLine[0] == '/')
                            {
                                lFilePath = lLine;
                            }
                            else
                            {
                                lFilePath = UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/" + lLine;
                            }
                        }
                    }
                }
            }

            soundcluster = ConstructorCollection.ConstructSoundcluster(lFilePath);
        }
Esempio n. 2
0
 public static void SetSoundcluster(string aPathFile)
 {
     soundcluster = ConstructorCollection.ConstructSoundcluster(aPathFile);
 }