 
 // Fill the whole bar and fade to black in a smooth oscillating fashion. Also, slowly
 // work our way through the global template
-void fill_mod_smooth() {
+void fill_mod_smooth(uint8_t bpm) {
   static uint8_t brightness = 0;
   static uint8_t prev_brightness = 0;
   static uint8_t pal_index = 0;
 
   // Modulate brigthness at input dependent rate
   prev_brightness = brightness;
+  /////////////////////////////////////////////////////////////////////////
+  // Set the timing here. If you have a potentiometer for the rate setup //
+  // you can uncomment the line below to read in from that.              //
+  /////////////////////////////////////////////////////////////////////////
   //brightness = beatsin8(map(analogRead(RATE_POT), 0, 1253, 120, 10), 0, maxBrightness);
-  brightness = beatsin8(80, 0, maxBrightness);
+  brightness = beatsin8(bpm, 0, maxBrightness);
 
   // If we are about to fade to black, grab the next color in the palette
   if (brightness == 1 && (brightness - prev_brightness) < 0) {

  FastLED.show();
}

void theater_chase_mod() {
  // Index shit
  static uint8_t pal_index = 0;
  static uint8_t col_inc = 0;

  // Update global hue position
  EVERY_N_MILLISECONDS(100) {
    gHue++;
  }

  // Move the palette index every 10 ms
  EVERY_N_MILLISECONDS(10) {
    pal_index++;
  }
  // Update the fill_palette spacing at an input dependent rate
  EVERY_N_MILLISECONDS_I(thisTimer, 150) {
    //thisTimer.setPeriod(map(analogRead(RATE_POT), 0, 1253, 1, 4000));
    col_inc++;
  }

  // Fill bar at input dependent rate. First record the previous lead value
  // so that we can check which diretion we are heading on the sin wave later on
  prev = lead;
  /////////////////////////////////////////////////////////////////////////
  // Set the timing here. If you have a potentiometer for the rate setup //
  // you can uncomment the line below to read in from that.              //
  /////////////////////////////////////////////////////////////////////////
  //lead = beatsin8(map(analogRead(RATE_POT), 0, 1253, 120, 10), 0, lead_max);
  lead = beatsin8(bpm, 0, lead_max);

  // If the eq bar is about to be empty, generate a new max length to fill.
  // Also increment the index of the palette, for a little more modulation cuz
