private void writeObject(ObjectOutputStream out) throws IOException { this.midiChannel = ftw.getMidiChannel(); if (ftw.getMidiDevice() != null) { this.midiDeviceIndex = project.getMidiDeviceIndex(ftw.getMidiDevice()); } out.defaultWriteObject(); }
/** * Construct an empty lane * * @param ftw * @param project */ public MidiLane(FrinikaTrackWrapper ftw, ProjectContainer project) { super("Midi " + nameCount++, project); this.ftw = ftw; // cntrlList=new ControllerList(); // TODO different lists // We do not want this part to be in the part list trackHeaderPart = new MidiPart(); trackHeaderPart.lane = this; programEvent = new ProgramChangeEvent(trackHeaderPart, 0, 0, 0, 0); programEvent.commitAdd(); midiChannel = ftw.getMidiChannel(); }
/** * 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; }
public int getMidiChannel() { return ftw.getMidiChannel(); }