Example #1
0
        //cons
        public VSTPanel(VSTRig _rig, int _plugNum)
        {
            InitializeComponent();

            rig         = _rig;
            audiwin     = rig.controlPanel.auditwin;
            host        = rig.controlPanel.host;
            midiDevices = rig.controlPanel.midiDevices;

            plugNum = _plugNum;
            this.lblPlugName.Text = plugName;
            plugPath = null;
            fileName = null;
            plugin   = null;

            this.Size = new Size(PANELWIDTH, PANELHEIGHT);

            pluginInfoWnd  = null;
            paramEditorWnd = null;
            editorWindow   = null;

            midiInDevice     = null;
            midiInUnit       = null;
            midiOutDeviceNum = -1;

            audioOut = "no output";
        }
Example #2
0
        //- midi i/o connections ----------------------------------------------

        public void connectMidiInput(InputDevice indev, PanelMidiIn pluginMidiIn)
        {
            //InputDevice indev = midiDevices.inputDevices[idx];
            try
            {
                indev.open();
                indev.connectUnit(pluginMidiIn);
                indev.start();
            }
            catch
            {
                //Console.WriteLine("error connecting midi input");
            }
        }
Example #3
0
        public void setMidiIn(String deviceName)
        {
            InputDevice indev = midiDevices.findInputDevice(deviceName);

            if (midiInDevice != indev)
            {
                if (midiInUnit != null)
                {
                    disconnectMidiInput(midiInDevice, midiInUnit);
                }
                midiInDevice = indev;
                if (midiInDevice != null)
                {
                    midiInUnit = new PanelMidiIn(this);
                    connectMidiInput(midiInDevice, midiInUnit);
                }
                else
                {
                    midiInUnit = null;
                }
            }
        }
Example #4
0
 public void disconnectMidiInput(InputDevice indev, PanelMidiIn pluginMidiIn)
 {
     //InputDevice indev = midiDevices.inputDevices[idx];
     //indev.disconnectUnit(pluginMidiIn);
 }