static void DemoTest2() { MusicPlayer player = new MusicPlayer(); Composition comp = new Composition(); Track track1 = new Track(PatchNames.Acoustic_Grand, 1); Track track2 = new Track(PatchNames.Cello, 2); Console.WriteLine("Hidden Markov Model, constant duration, twinkle"); var mel1 = GetMelodySequence(@"test\harry.mid"); var stoch = new StochasticGenerator(new MelodySequence[] { mel1 }); track1.AddSequence(stoch.Generate()); track2.AddSequence(stoch.Generate()); //comp.Add(track1); comp.Add(track2); player.Play(comp); return; }
static void DemoTest1() { Console.WriteLine("Hidden Markov Model, constant duration, twinkle"); var mel1 = GetMelodySequence(@"test\harry.mid"); var stoch = new StochasticGenerator(new MelodySequence[] { mel1 }); var notes3 = stoch.Generate(); Play(notes3); return; }