Beispiel #1
0
 public void Write(DarkOutStream s)
 {
     for (int i = 0; i < Channels.Length; i++)
     {
         s.OpenChunk("CHAN");
         s.Write(i);
         Channels[i].Write(s);
         s.CloseChunk();
     }
 }
Beispiel #2
0
 public void Write(DarkOutStream s)
 {
     s.Write(Time);
     s.WriteByteArray(controllers);
 }
Beispiel #3
0
 public static void Save(string path)
 {
     DarkOutStream dos = new DarkOutStream(File.Create(path));
     dos.OpenChunk("VSEQ");
     dos.Write(FramesPerTick);
     dos.OpenChunk("SONG");
     Song.Write(dos);
     dos.CloseChunk();
     dos.CloseChunk();
     dos.Close();
 }
Beispiel #4
0
        public void Write(DarkOutStream s)
        {
            s.Write(StartTime);
            s.Write(Length);

            s.OpenChunk("NOTE");
            s.Write(NoteEvents.Count);
            foreach (NoteEvent e in NoteEvents)
            {
                s.Write(e.StartTime);
                s.Write(e.Note);
                s.Write(e.Velocity);
                s.Write(e.Length);
            }
            s.CloseChunk();

            s.OpenChunk("CTRL");
            s.Write(ControllerEvents.Count);
            foreach (Event e in ControllerEvents)
            {
                s.Write(e.Time);
                s.Write(e.Message.GetAsUInt());
            }
            s.CloseChunk();
        }