private int addTonalComponents(float[] spectrum,int numComponents,TonalComponent[] components){
  int lastPos=-1;
  for (int i=0; i < numComponents; i++) {
    lastPos=Math.max(components[i].pos + components[i].numCoefs,lastPos);
    for (int j=0; j < components[i].numCoefs; j++) {
      spectrum[components[i].pos + j]+=components[i].coef[j];
    }
  }
  return lastPos;
}

private int addTonalComponents ( float [ ] spectrum , int numComponents , TonalComponent [ ] components ) { int lastPos = - 1 ; for ( int i = 0 ; i < numComponents ; i ++ ) { lastPos = Math . max ( components [ i ] . pos + components [ i ] . numCoefs , lastPos ) ; for ( int j = 0 ; j < components [ i ] . numCoefs ; j ++ ) { spectrum [ components [ i ] . pos + j ] += components [ i ] . coef [ j ] ; } } return lastPos ; }
combine the tonal band spectrum and regular band spectrum
