Пример #1
0
        private void TestParser()
        {
            Console.WriteLine("=== Test file parsing");
            string basePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + System.IO.Path.DirectorySeparatorChar;
            string origPath = basePath + "Inv8.mid";
            string destPath = basePath + "Inv8_identical.mid";

            sequence = MidiFileParser.ParseMidiFile(origPath);
            Console.WriteLine("  Parsed midi file");
            MidiFileWriter.WriteMidiFile(sequence, destPath);
            Console.WriteLine("  Wrote midi file");
            sequence = MidiFileParser.ParseMidiFile(destPath);
            Console.WriteLine("  Re-Parsed midi file");
        }
Пример #2
0
 public MessageTests()
 {
     stream = new MemoryStream();
     writer = new MidiFileWriter(stream);
 }