 byte denominator;
 byte bars;
 double fullDenominator;
+
+byte currentNumerator = 0;
 
 boolean nextPartScheduled = false;
 

    digitalWrite(bpmLed, LOW);
    playing = false;
    bars = 0;
    changeMode(NORMAL_MODE);
  }
}

    counter++;

    if (denominator > 0) {
      double tempIncrease = (tempCounter / 24.0) * (denominator / 4.0);
      double increase = (1 / 24.0) * (denominator / 4.0) + tempIncrease;
      fullDenominator = fullDenominator + increase;
      tempCounter = 0;

      currentNumerator = ((byte) fullDenominator) % numberOfChannelButtons;

      if (fullDenominator >= numerator && numerator > 0) {
        fullDenominator = 0;
        currentNumerator = 0;
        bars++;
        handleBarChange();
      }
    } else {
      tempCounter++;
    }

    if (counter == 24) {
      counter = 0;
      digitalWrite(bpmLed, HIGH);

      channelButtons[currentNumerator].turnLedOn();
    }
    if (counter == 5) {
      turnAllChannelButtonsOff();
      digitalWrite(bpmLed, LOW);
    }
  }
