public IMidiMessage Clone() { IMidiMessage ret = null; if (this.MessageType == MessageType.Channel) { ret = new ChannelMessage(MessageData); } else if (this.MessageType == MessageType.Meta) { ret = new MetaMessage(this.MetaType, byteData); } else if (this.MessageType == MessageType.SystemCommon) { ret = new SysCommonMessage(MessageData); } else if (this.MessageType == MessageType.SystemExclusive) { ret = new SysExMessage(byteData); } else if (this.MessageType == MessageType.SystemRealtime) { ret = SysRealtimeMessage.FromType(realtimeType); ; } return(ret); }
private void Write(SysRealtimeMessage message) { // Escaped messages cancel running status. runningStatus = 0; // Escaped message. //trackData.Add((byte)0xF7); //trackData.Add((byte)message.Status); }
public virtual void Send(SysRealtimeMessage message) { #region Require if (IsDisposed) { throw new ObjectDisposedException(this.GetType().Name); } #endregion Send(message.Message); }
/// <summary> /// Determines whether two SysRealtimeMessage instances are equal. /// </summary> /// <param name="obj"> /// The SysRealtimeMessage to compare with the current SysRealtimeMessage. /// </param> /// <returns> /// <b>true</b> if the specified SysRealtimeMessage is equal to the current /// SysRealtimeMessage; otherwise, <b>false</b>. /// </returns> public override bool Equals(object obj) { #region Guard if (!(obj is SysRealtimeMessage)) { return(false); } #endregion SysRealtimeMessage message = (SysRealtimeMessage)obj; return(this.msg == message.msg); }
private void ParseSysRealtimeMessage() { SysRealtimeMessage e = null; switch ((SysRealtimeType)status) { case SysRealtimeType.ActiveSense: e = SysRealtimeMessage.ActiveSenseMessage; break; case SysRealtimeType.Clock: e = SysRealtimeMessage.ClockMessage; break; case SysRealtimeType.Continue: e = SysRealtimeMessage.ContinueMessage; break; case SysRealtimeType.Reset: e = SysRealtimeMessage.ResetMessage; break; case SysRealtimeType.Start: e = SysRealtimeMessage.StartMessage; break; case SysRealtimeType.Stop: e = SysRealtimeMessage.StopMessage; break; case SysRealtimeType.Tick: e = SysRealtimeMessage.TickMessage; break; } if (e != null) { newTrack.Insert(ticks, e); } }
public static SysRealtimeMessage FromType(SysRealtimeType type) { SysRealtimeMessage e = null; switch (type) { case SysRealtimeType.ActiveSense: e = SysRealtimeMessage.ActiveSenseMessage; break; case SysRealtimeType.Clock: e = SysRealtimeMessage.ClockMessage; break; case SysRealtimeType.Continue: e = SysRealtimeMessage.ContinueMessage; break; case SysRealtimeType.Reset: e = SysRealtimeMessage.ResetMessage; break; case SysRealtimeType.Start: e = SysRealtimeMessage.StartMessage; break; case SysRealtimeType.Stop: e = SysRealtimeMessage.StopMessage; break; case SysRealtimeType.Tick: e = SysRealtimeMessage.TickMessage; break; } return(e); }
private SysRealtimeMessageEventArgs(SysRealtimeMessage message) { this.message = message; }
public virtual void Send(SysRealtimeMessage message) { Send(message.Message); }
public virtual void Send(SysRealtimeMessage message) { #region Require if(IsDisposed) { throw new ObjectDisposedException(this.GetType().Name); } #endregion Send(message.Message); }
public virtual void Send(SysRealtimeMessage message) { Send(message.Message); }
private void Write(SysRealtimeMessage message) { // Escaped messages cancel running status. runningStatus = 0; // Escaped message. trackData.Add((byte)0xF7); trackData.Add((byte)message.Status); }
private SysRealtimeMessageEventArgs(SysRealtimeMessage message) { this.message = message; }
private void ParseSysRealtimeMessage() { newTrack.Insert(ticks, SysRealtimeMessage.FromType((SysRealtimeType)status)); }