Ejemplo n.º 1
0
 public static void Reset()
 {
     FramesPerTick = 21;
     Song = new Song();
 }
Ejemplo n.º 2
0
        public static void Load(string path)
        {
            DarkInStream dis = new DarkInStream(File.OpenRead(path));
            Song = new Song();
            dis.ReadChunk(delegate(string id, long length, DarkInStream s)
            {
                if (id.Equals("VSEQ"))
                {
                    s.Read(out FramesPerTick);

                    s.ReadChunk(delegate(string id2, long length2, DarkInStream s2)
                    {
                        if (id2.Equals("SONG"))
                        {
                            s2.ReadAllChunks(Song);
                        }
                    });
                }
            });
            dis.Close();

            foreach (Channel c in Song.Channels)
            {
                foreach (MidiMessage m in c.Patches[0].Get())
                {
                    PlayMidiEvent(m, false);
                }
            }
        }