protected void importFrames(double[] frames,double step){
  ArrayList<PitchTarget> newTargets=new ArrayList<PitchTarget>();
  double t=xmin;
  for (int i=0; i < frames.length; i++) {
    if (!Double.isNaN(frames[i])) {
      newTargets.add(new PitchTarget(t,frames[i]));
    }
    t+=step;
  }
  targets=newTargets.toArray(new PitchTarget[0]);
  numTargets=targets.length;
}

protected void importFrames ( double [ ] frames , double step ) { ArrayList < PitchTarget > newTargets = new ArrayList < PitchTarget > ( ) ; double t = xmin ; for ( int i = 0 ; i < frames . length ; i ++ ) { if ( ! Double . isNaN ( frames [ i ] ) ) { newTargets . add ( new PitchTarget ( t , frames [ i ] ) ) ; } t += step ; } targets = newTargets . toArray ( new PitchTarget [ 0 ] ) ; numTargets = targets . length ; }
for every frame that is not nan , create a pitch - time target .
