try { if ((port==PatchEdit.appConfig.getFaderPort()) && (fader!=null)) { MidiDevice srcDevice=MidiSystem.getMidiDevice ((MidiDevice.Info)sourceInfoVector.get (port)); fader=srcDevice.getTransmitter (); return; }; if (currentInport!=port) { input.setReceiver (null); input.close (); MidiDevice srcDevice=MidiSystem.getMidiDevice ((MidiDevice.Info)sourceInfoVector.get (port)); input=srcDevice.getTransmitter (); input.setReceiver (this); } currentInport=port; } catch (Exception e) { e.printStackTrace (); ErrorMsg.reportError ("Error","Wire MIDI is flipping out.",e); }
try { if ((port==PatchEdit.appConfig.getFaderPort()) && (fader!=null)) { MidiDevice srcDevice=MidiSystem.getMidiDevice ((MidiDevice.Info)sourceInfoVector.get (port)); fader=srcDevice.getTransmitter (); return; }; if (currentInport!=port) { input.setReceiver (null); input.close (); MidiDevice srcDevice=MidiSystem.getMidiDevice ((MidiDevice.Info)sourceInfoVector.get (port)); input=srcDevice.getTransmitter (); input.setReceiver (this); } currentInport=port; } catch (Exception e) { e.printStackTrace (); ErrorMsg.reportError ("Error","Wire MIDI is flipping out.",e);
	public void setInputDeviceNum (int port)throws Exception {		try {			if ((port==PatchEdit.appConfig.getFaderPort()) && (fader!=null)) {        		MidiDevice srcDevice=MidiSystem.getMidiDevice ((MidiDevice.Info)sourceInfoVector.get (port));				fader=srcDevice.getTransmitter ();				return;			};      		if (currentInport!=port) {				input.setReceiver (null);				input.close ();				MidiDevice srcDevice=MidiSystem.getMidiDevice ((MidiDevice.Info)sourceInfoVector.get (port));				input=srcDevice.getTransmitter ();				input.setReceiver (this);			}			currentInport=port;		} catch (Exception e) {			e.printStackTrace ();			ErrorMsg.reportError ("Error","Wire MIDI is flipping out.",e);		}	}