예제 #1
0
        public void TestUSTLength()
        {
            foreach (string fp in Directory.EnumerateFiles(@"D:\Test UST Archive\Full", "*", SearchOption.AllDirectories)
                     .Where((s) => s.ToLower().EndsWith(".ust")))
            {
                USTFile f = new USTFile(fp);
                if (f.Notes.Count >= 140)
                {
                    File.Copy(fp, Path.Combine(@"D:\Test UST Archive\Longer 140 Notes", fp.Substring(3).Replace(@"\", "__").Substring(24)));
                }

                if (f.Notes.Count > 0 && f.Notes.Max((n) => n.Portamento != null && n.Portamento.Segments.Count >= 2))
                {
                    File.Copy(fp, Path.Combine(@"D:\Test UST Archive\Tuned", fp.Substring(3).Replace(@"\", "__").Substring(24)));
                }
            }
        }
        private static void FilterUSTs()
        {
            foreach (string fp in Directory.EnumerateFiles(InputLocations[0], "*", SearchOption.AllDirectories)
                     .Where((s) => s.ToLower().EndsWith(".ust")))
            {
                USTFile f = new USTFile(fp);
                if (f.Notes.Count >= 140)
                {
                    File.Copy(fp, Path.Combine(outputLocation1, fp.Substring(3).Replace(@"\", "__")));
                }

                if (f.Notes.Count > 0 && f.Notes.Max((n) => n.Portamento != null && n.Portamento.Segments.Count >= 2))
                {
                    File.Copy(fp, Path.Combine(outputLocation2, fp.Substring(3).Replace(@"\", "__")));
                }
            }

            Logger.SaveAndOpen();
        }