Пример #1
0
        /// <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);
        }
Пример #2
0
        /// <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);
            }
        }
Пример #3
0
 private void Start()
 {
     midiSender.Init();
     midiSender.Send();
 }