     if (analog < 508)   return 3;
     if (analog < 604)   return 4;
     if (analog < 694)   return 5;
-    if (analog < 765)   return 7;
+    if (analog < 764)   return 7;
     if (analog < 929)   return 6;
-    if (analog < 957)   return 8;
+    if (analog < 955)   return 8;
     return 9;
 }
 

    uint8_t sine;
    uint8_t value;

    sine = cubicwave8(animation());
    start = pots.val - 100;
    if (start > pots.val) {
        start = 0;
    }
    value = map(sine, 0, 255, start, pots.val);

#ifdef DEBUG_ANIMATION
    char buf[128];

// All the different modes available.
#define MAX_MODES 10
void modeBreathe();
void modeBreatheGradient();
void modeEase();
void modeGradient();
void modeOff();
