public static SampleBank FromPath(string fileName) {
            SampleBank sb = new SampleBank();

            if (System.IO.File.Exists(System.IO.Path.Combine(fileName, "oto.ini"))) {
                sb.SampleRoot = fileName;
                return sb;
            }
            else throw new ArgumentException
                ("The path \"" + fileName + "\" does not refer to a valid UTAU-style sample bank. ");
        }
        public static SampleBank FromPaths(IEnumerable<String> paths) {
            SampleBank mainsb = new SampleBank();
            mainsb.IsMegaBank = true;

            foreach (string path in paths) {
                if (System.IO.File.Exists(System.IO.Path.Combine(path, "oto.ini"))) {
                    mainsb.Components.Add(SampleBank.FromPath(path));
                    System.Windows.Forms.MessageBox.Show("added " + path);
                }
                else System.Windows.Forms.MessageBox.Show("added " + path);
            }
            return mainsb;
        }
Exemple #3
0
        public static SampleBank FromPath(string fileName)
        {
            SampleBank sb = new SampleBank();

            if (System.IO.File.Exists(System.IO.Path.Combine(fileName, "oto.ini")))
            {
                sb.SampleRoot = fileName;
                return(sb);
            }
            else
            {
                throw new ArgumentException
                          ("The path \"" + fileName + "\" does not refer to a valid UTAU-style sample bank. ");
            }
        }
Exemple #4
0
        public static SampleBank FromPaths(IEnumerable <String> paths)
        {
            SampleBank mainsb = new SampleBank();

            mainsb.IsMegaBank = true;

            foreach (string path in paths)
            {
                if (System.IO.File.Exists(System.IO.Path.Combine(path, "oto.ini")))
                {
                    mainsb.Components.Add(SampleBank.FromPath(path));
                    System.Windows.Forms.MessageBox.Show("added " + path);
                }
                else
                {
                    System.Windows.Forms.MessageBox.Show("added " + path);
                }
            }
            return(mainsb);
        }