コード例 #1
0
 private void playingEvent(MyMMLSequencer.EventLocation loc, UInt32 step, UInt32 gate, MyMMLSequence.Instruction inst)
 {
     if (PlayingEvent != null)
     {
         PlayingEvent(loc, step, gate, inst);
     }
 }
コード例 #2
0
 private void appDataEvent(MyMMLSequencer.EventLocation loc, string data)
 {
     if (AppDataEvent != null)
     {
         AppDataEvent(loc, data);
     }
 }
コード例 #3
0
 private int nextSectionEvent(MyMMLSequencer.EventLocation loc, int nextSection)
 {
     if (NextSectionEvent != null)
     {
         return(NextSectionEvent(loc, nextSection));
     }
     return(nextSection);
 }
コード例 #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);
        }
コード例 #5
0
        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);
                }
            }
        }
コード例 #6
0
 private void appDataEventFunc(MyMMLSequencer.EventLocation loc, string data)
 {
     System.Text.StringBuilder sb = new System.Text.StringBuilder();
     sb.Append(data);
     appendStb(sb.ToString());
 }