public SampleSet generateSamples(string path)
        {
            SampleSet set = new SampleSet();

            var files = Utils.GetFiles(path);
            int percentage = files.Length / 100;
            Parallel.For(0, files.Length, j =>
            {
                var f = files[j];
                bool continue_ = true;
                if (System.IO.Path.GetExtension(f) != ".mid")
                    continue_ = false;
                Console.WriteLine("Adding {0}",System.IO.Path.GetFileNameWithoutExtension(f));
                if (continue_)
                {
                    SampleSet songset = new SampleSet();
                    try
                    {
                        songset = LoadSampleSetFromMelody(files[j]);
                    }
                    catch(Exception e)
                    {
                        Console.WriteLine(e.Message);
                    }
                    set.addAll(songset);
                }
            });

            return set;
        }
 public SampleSet GenerateSamples(Composition[] compositions)
 {
     SampleSet set = new SampleSet();
     foreach(var comp in compositions)
     {
         SampleSet songset = new SampleSet();
         //try
        // {
             songset = LoadSampleSetFromComposition(comp);
        // }
       //  catch (Exception e)
       //  {
       //      Console.WriteLine(e.Message);
       //  }
         set.addAll(songset);
     }
     return set;
 }