예제 #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
  /**
   * 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();
  }
예제 #3
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;
  }
예제 #4
0
 public int getMidiChannel() {
   return ftw.getMidiChannel();
 }