Ejemplo n.º 1
0
 private void playingEvent(MyMMLSequencer.EventLocation loc, UInt32 step, UInt32 gate, MyMMLSequence.Instruction inst)
 {
     if (PlayingEvent != null)
     {
         PlayingEvent(loc, step, gate, inst);
     }
 }
Ejemplo n.º 2
0
 private void appDataEvent(MyMMLSequencer.EventLocation loc, string data)
 {
     if (AppDataEvent != null)
     {
         AppDataEvent(loc, data);
     }
 }
Ejemplo n.º 3
0
 private int nextSectionEvent(MyMMLSequencer.EventLocation loc, int nextSection)
 {
     if (NextSectionEvent != null)
     {
         return(NextSectionEvent(loc, nextSection));
     }
     return(nextSection);
 }
Ejemplo n.º 4
0
        private void playingEventFunc(MyMMLSequencer.EventLocation loc, uint step, uint gate, MyMMLSequence.Instruction inst)
        {
            var str = loc.TrackNo.ToString("D2") + " " + loc.MeasureCount.ToString("D3") + ":" + loc.TickCount.ToString("D3") + " " + step.ToString("D3") + ":" + gate.ToString("D3") + " ";

            if ((int)inst.N == 0)
            {
                str += inst.N.ToString();
            }
            else if ((int)inst.N < 128)
            {
                char c0  = "CCDDEFFGGAAB"[(int)inst.N % 12];
                char c1  = " # #  # # # "[(int)inst.N % 12];
                int  oct = ((int)inst.N / 12) - 2;
                str += c0.ToString() + c1.ToString() + oct.ToString() + " " + inst.V.ToString("D3");
            }
            else
            {
                str += inst.N.ToString() + " <0x" + (inst.V | ((int)inst.Q << 8)).ToString("X4") + ">";
            }
            appendStb(str);
        }
        private void playingEvent(MyMMLSequencer.EventLocation loc, uint step, uint gate, MyMMLSequence.Instruction inst)
        {
            var str =

                /*loc.Port.ToString("D2") + ":" +
                 * loc.Channel.ToString("D2") + " " +*/
                loc.TrackNo.ToString("D2") + " " +
                loc.MeasureCount.ToString("D3") + ":" +
                convertTimeBase(loc.TickCount).ToString("D3") + " " +
                convertTimeBase(step).ToString("D3") + ":" +
                convertTimeBase(gate).ToString("D3") + " ";

            if ((int)inst.N == 0)
            {
                str += inst.N.ToString();
            }
            else if ((int)inst.N < 128)
            {
                char c0  = "CCDDEFFGGAAB"[(int)inst.N % 12];
                char c1  = " # #  # # # "[(int)inst.N % 12];
                int  oct = ((int)inst.N / 12) - 2;
                str += c0.ToString() + c1.ToString() + oct.ToString() + " " + inst.V.ToString("D3");
            }
            else
            {
                str += inst.N.ToString() + " <0x" + (inst.V | ((int)inst.Q << 8)).ToString("X4") + ">";
            }
            lock (lines)
            {
                lines.Add(str);
                if (lines.Count > 16)
                {
                    lines.RemoveAt(0);
                }
            }
        }
Ejemplo n.º 6
0
 private void appDataEventFunc(MyMMLSequencer.EventLocation loc, string data)
 {
     System.Text.StringBuilder sb = new System.Text.StringBuilder();
     sb.Append(data);
     appendStb(sb.ToString());
 }