/// <summary> /// Visits system exclusive messages. /// </summary> /// <param name="message"> /// The SysExMessage to visit. /// </param> void Multimedia.Midi.IMidiMessageVisitor.Visit(SysExMessage message) { // System exclusive messages cancel running status. runningStatus = 0; // Send system exclusive message. MidiSender.Send(message); }
/// <summary> /// Visits channel messages. /// </summary> /// <param name="message"> /// The ChannelMessage to visit. /// </param> public void Visit(ChannelMessage message) { // If the running status does not match the channel message's // status. if (runningStatus != message.Status) { // Update status value. runningStatus = message.Status; // Send message with status value. MidiSender.Send(message, true); } // Else the running status matches the channel message's status. else { // Send message without status value. MidiSender.Send(message, false); } }
private void Start() { midiSender.Init(); midiSender.Send(); }