Exemplo n.º 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();
     }
 }
Exemplo n.º 2
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();
 }
Exemplo n.º 3
0
        public void Write(DarkOutStream s)
        {
            foreach (Clip c in Clips)
            {
                s.OpenChunk("CLIP");
                c.Write(s);
                s.CloseChunk();
            }

            foreach (Patch p in Patches)
            {
                s.OpenChunk("PTCH");
                p.Write(s);
                s.CloseChunk();
            }
        }
Exemplo n.º 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();
        }
Exemplo n.º 5
0
 private void savePatchToolStripMenuItem_Click(object sender, EventArgs e)
 {
     saveFileDialog1.InitialDirectory = patchesDir;
     DialogResult res = saveFileDialog1.ShowDialog();
     if (res == DialogResult.OK)
     {
         DarkOutStream dos = new DarkOutStream(File.Create(saveFileDialog1.FileName));
         dos.OpenChunk("PTCH");
         selectedChannel.Patches[0].Write(dos);
         dos.CloseChunk();
         dos.Close();
     }
     RefreshPatches();
 }