private void writeObject(ObjectOutputStream out) throws IOException { this.midiChannel = ftw.getMidiChannel(); if (ftw.getMidiDevice() != null) { this.midiDeviceIndex = project.getMidiDeviceIndex(ftw.getMidiDevice()); } out.defaultWriteObject(); }
/** * The index of the midiDevice according to the stored order in the saved project * * @return */ public Integer getMidiDeviceIndex() { // // PJL added this (not sure about this) if (midiDeviceIndex == null) { this.midiChannel = ftw.getMidiChannel(); if (ftw.getMidiDevice() != null) { this.midiDeviceIndex = project.getMidiDeviceIndex(ftw.getMidiDevice()); } } // //----------------- return midiDeviceIndex; }
/** @return The reciever associated with this lane */ public Receiver getReceiver() { MidiDevice dev = ftw.getMidiDevice(); if (dev == null) { return null; } try { // Jens: // return getTrack().getMidiDevice().getReceiver(); Receiver r = ftw.getMidiDevice().getReceiver(); if (r != null) { return new MonitorReceiver(midiMessageListeners, r); } else { return null; } } catch (MidiUnavailableException e) { // TODO Auto-generated catch block e.printStackTrace(); return null; } }
public MidiDevice getMidiDevice() { return ftw.getMidiDevice(); }