         float phaseDiff = norm_rads(phase - _old_phase);
 
         // when we jump buckets, we need to be able to change beat
-        if (maxIndex > 7) {
+        if (maxIndex > 4) {
           phaseDiff *= 0.5;
           if (abs(_phase_avg) > PI / 2) {
             phase = phase * 0.5;

    float maxValue = -1000;
    uint16_t maxIndex = startIndex;
    for (int i = startIndex; i < endIndex; i++) {
        if (i <= 1) {
          continue;
        }
        float val = mag[i];

  float phase[20];
  uint16_t startIndex, endIndex;
  // KickFFT<int32_t>::fft(fs, 0, 4, FFT_SIZE, fftBuffer, mag, startIndex, endIndex);
  fft_phase(fs, 0, 4, FFT_SIZE, fftBuffer, mag, phase, startIndex, endIndex);
  updatePhase(mag, phase, startIndex, endIndex);
  float hz = fs * _phaseRateAverage / 2 / PI;
  // Serial.print("endIndex: "); Serial.println(endIndex);
