示例#1
0
 private void writeObject(ObjectOutputStream out) throws IOException {
   this.midiChannel = ftw.getMidiChannel();
   if (ftw.getMidiDevice() != null) {
     this.midiDeviceIndex = project.getMidiDeviceIndex(ftw.getMidiDevice());
   }
   out.defaultWriteObject();
 }
示例#2
0
  /**
   * 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;
  }
示例#3
0
  /** @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;
    }
  }
示例#4
0
 public MidiDevice getMidiDevice() {
   return ftw.getMidiDevice();
 }