Example #1
0
        public static IStaticMssMsgInfo Create(MssMsgType msgInfoType)
        {
            IStaticMssMsgInfo msgInfo;

            switch (msgInfoType)
            {
            case MssMsgType.Note:
            {
                msgInfo = new StaticNoteMsgInfo();
                break;
            }

            case MssMsgType.NoteOn:
            {
                msgInfo = new StaticNoteOnMsgInfo();
                break;
            }

            case MssMsgType.NoteOff:
            {
                msgInfo = new StaticNoteOffMsgInfo();
                break;
            }

            case MssMsgType.CC:
            {
                msgInfo = new StaticCCMsgInfo();
                break;
            }

            case MssMsgType.PitchBend:
            {
                msgInfo = new StaticPitchBendMsgInfo();
                break;
            }

            case MssMsgType.PolyAftertouch:
            {
                msgInfo = new StaticPolyAftertouchMsgInfo();
                break;
            }

            case MssMsgType.ChanAftertouch:
            {
                msgInfo = new StaticChanAftertouchMsgInfo();
                break;
            }

            case MssMsgType.Generator:
            {
                msgInfo = new StaticGeneratorMsgInfo();
                break;
            }

            case MssMsgType.GeneratorModify:
            {
                msgInfo = new StaticGeneratorModifyMsgInfo();
                break;
            }

            case MssMsgType.RelBarPeriodPos:
            {
                msgInfo = new StaticRelBarPeriodPosMsgInfo();
                break;
            }

            case MssMsgType.RelTimePeriodPos:
            {
                msgInfo = new StaticRelTimePeriodPosMsgInfo();
                break;
            }

            case MssMsgType.Parameter:
            {
                msgInfo = new StaticParameterMsgInfo();
                break;
            }

            default:
            {
                //Unknown type
                Debug.Assert(false);
                msgInfo = null;
                break;
            }
            }
            return(msgInfo);
        }
        public static IStaticMssMsgInfo Create(MssMsgType msgInfoType)
        {
            IStaticMssMsgInfo msgInfo;

            switch (msgInfoType)
            {
                case MssMsgType.Note:
                    {
                        msgInfo = new StaticNoteMsgInfo();
                        break;
                    }
                case MssMsgType.NoteOn:
                    {
                        msgInfo = new StaticNoteOnMsgInfo();
                        break;
                    }
                case MssMsgType.NoteOff:
                    {
                        msgInfo = new StaticNoteOffMsgInfo();
                        break;
                    }
                case MssMsgType.CC:
                    {
                        msgInfo = new StaticCCMsgInfo();
                        break;
                    }
                case MssMsgType.PitchBend:
                    {
                        msgInfo = new StaticPitchBendMsgInfo();
                        break;
                    }
                case MssMsgType.PolyAftertouch:
                    {
                        msgInfo = new StaticPolyAftertouchMsgInfo();
                        break;
                    }
                case MssMsgType.ChanAftertouch:
                    {
                        msgInfo = new StaticChanAftertouchMsgInfo();
                        break;
                    }
                case MssMsgType.Generator:
                    {
                        msgInfo = new StaticGeneratorMsgInfo();
                        break;
                    }
                case MssMsgType.GeneratorModify:
                    {
                        msgInfo = new StaticGeneratorModifyMsgInfo();
                        break;
                    }
                case MssMsgType.RelBarPeriodPos:
                    {
                        msgInfo = new StaticRelBarPeriodPosMsgInfo();
                        break;
                    }
                case MssMsgType.RelTimePeriodPos:
                    {
                        msgInfo = new StaticRelTimePeriodPosMsgInfo();
                        break;
                    }
                case MssMsgType.Parameter:
                    {
                        msgInfo = new StaticParameterMsgInfo();
                        break;
                    }
                default:
                    {
                        //Unknown type
                        Debug.Assert(false);
                        msgInfo = null;
                        break;
                    }
            }
            return msgInfo;
        }