     discoTwirl();
   }
 
-  delay(30);
-
   firstTimeRunningThroughPattern = false;
 
   show_at_max_brightness_for_power();

    }
  }
  
  //  if (thisdir == 0) thisphase+=thisspeed; else thisphase-=thisspeed;          // You can change direction and speed individually.
  thisphase += thisspeed;
//  thishue += thisrot;                                                         // Hue rotation is fun for thiswave.
  for (int k=0; k<NUM_LEDS-1; k++) {
    int thisbright = qsubd(cubicwave8((k*allfreq)+thisphase), thiscutoff);      // qsub sets a minimum value called thiscutoff. If < thiscutoff, then bright = 0. Otherwise, bright = 128 (as defined in qsub)..

void discoTwirl() {

  if (firstTimeRunningThroughPattern) {
    thishue = 0;                                          // You can change the starting hue value for the first wave.
    thisrot = 0;                                          // You can change how quickly the hue rotates for this wave. Currently 0.
    allsat = 255;                                         // I like 'em fully saturated with colour.
    thisdir = 1;                                             // You can change direction.
    thisspeed = 48;                                         // You can change the speed, and use negative values.
    allfreq = 32;                                         // You can change the frequency, thus overall width of bars.
    thisphase = 0;                                            // Phase change value gets calculated.
    thiscutoff = 200;    
    
  } else {
    EVERY_N_MILLISECONDS(1000) {
//      allfreq += 1;
