Esempio n. 1
0
        private void SwitchToMidiDevice(MidiInDevice device)
        {
            foreach (ToolStripItem item in midiToolStripMenuItem.DropDownItems)
            {
                if (item is ToolStripMenuItem)
                {
                    ((ToolStripMenuItem)item).Checked = (item.Tag == device);
                }
            }

            if (midiDevice != null)
            {
                midiDevice.Stop();
                midiDevice.Close();
            }

            midiDevice = device;

            if (midiDevice != null)
            {
                enableUF6Hack = midiDevice.Name.Equals("UF MIDI IN");

                midiDevice.Open(handlerKeepalive);
                midiDevice.Start();
            }
        }
Esempio n. 2
0
        void OnMidiInput(MidiInDevice sender, MidiMessage message)
        {
            if (enableUF6Hack)
            {
                if (message.Command == MidiMessage.Commands.Controller && message.Param1 == 7)
                {
                    message.Param1 = message.Channel + 11;
                }
            }

            if (selectedTab == 0)
            {
                channelEditor1.OnMidiInput(message);
            }
            else
            {
                clipEditor1.OnMidiInput(message);
            }
        }