Generate() public method

public Generate ( ) : GeneticMIDI.Representation.MelodySequence
return GeneticMIDI.Representation.MelodySequence
コード例 #1
0
ファイル: Program.cs プロジェクト: stefan-j/GeneticMIDI
 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;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: stefan-j/GeneticMIDI
 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;
 }