       synth.setChannelVolume(channels[layer], temp);
     }
 
-// don't draw the prgress bar on the performance layer
-if (layer != LAYERS - 1)
-{
-    // Turn on new column
-    line_vert(col - display_offset, true);
-}
+    // don't draw the prgress bar on the performance layer
+    if (layer != LAYERS - 1)
+    {
+      // Turn on new column
+      line_vert(col - display_offset, true);
+    }
     // play notes on new column on all layers
     for(uint8_t layer_index=0;layer_index<LAYERS - 1; layer_index++) 
     {

// add MT32 drum channel scale with only active notes

static const uint8_t PROGMEM
scales[MAX_SCALES][MAX_MIDI_NOTES] = {{107, 105, 103, 101, 100, 98, 96, 95, 93, 91, 89, 88, 86, 84, 83, 81, 79, 77, 76, 74, 72, 71, 69, 67, 65, 64, 62, 60, 59, 57, 55, 53, 52, 50, 48, 47, 45, 43, 41, 40, 38, 36, 35, 33, 31, 29, 28, 26, 24, 23, 21, 19, 17, 16, 14, 12} ,
{106, 104, 103, 101, 99, 98, 96, 94, 92, 91, 89, 87, 86, 84, 82, 80, 79, 77, 75, 74, 72, 70, 68, 67, 65, 63, 62, 60, 58, 56, 55, 53, 51, 50, 48, 46, 44, 43, 41, 39, 38, 36, 34, 32, 31, 29, 27, 26, 24, 22, 20, 19, 17, 15, 14, 12} ,
{87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32} ,
{114, 113, 111, 108, 106, 103, 102, 101, 99, 96, 94, 91, 90, 89, 87, 84, 82, 79, 78, 77, 75, 72, 70, 67, 66, 65, 63, 60, 58, 55, 54, 53, 51, 48, 46, 43, 42, 41, 39, 36, 34, 31, 30, 29, 27, 24, 22, 19, 18, 17, 15, 12, 10, 7, 6, 5} ,
{100, 99, 97, 96, 94, 93, 91, 90, 88, 87, 85, 84, 82, 81, 79, 78, 76, 75, 73, 72, 70, 69, 67, 66, 64, 63, 61, 60, 58, 57, 55, 54, 52, 51, 49, 48, 46, 45, 43, 42, 40, 39, 37, 36, 34, 33, 31, 30, 28, 27, 25, 24, 22, 21, 19, 18} ,
{96, 95, 94, 93, 92, 91, 89, 87, 86, 84, 83, 82, 81, 80, 79, 77, 75, 74, 72, 71, 70, 69, 68, 67, 65, 63, 62, 60, 59, 58, 57, 56, 55, 53, 51, 50, 48, 47, 46, 45, 44, 43, 41, 39, 38, 36, 35, 34, 33, 32, 31, 29, 27, 26, 24, 23} ,
{107, 104, 103, 101, 100, 98, 96, 95, 92, 91, 89, 88, 86, 84, 83, 80, 79, 77, 76, 74, 72, 71, 68, 67, 65, 64, 62, 60, 59, 56, 55, 53, 52, 50, 48, 47, 44, 43, 41, 40, 38, 36, 35, 32, 31, 29, 28, 26, 24, 23, 20, 19, 17, 16, 14, 12} ,
{107, 104, 103, 101, 99, 98, 96, 95, 92, 91, 89, 87, 86, 84, 83, 80, 79, 77, 75, 74, 72, 71, 68, 67, 65, 63, 62, 60, 59, 56, 55, 53, 51, 50, 48, 47, 44, 43, 41, 39, 38, 36, 35, 32, 31, 29, 27, 26, 24, 23, 20, 19, 17, 15, 14, 12} ,
{107, 105, 103, 101, 99, 98, 96, 95, 93, 91, 89, 87, 86, 84, 83, 81, 79, 77, 75, 74, 72, 71, 69, 67, 65, 63, 62, 60, 59, 57, 55, 53, 51, 50, 48, 47, 45, 43, 41, 39, 38, 36, 35, 33, 31, 29, 27, 26, 24, 23, 21, 19, 17, 15, 14, 12} ,
{115, 111, 110, 108, 107, 105, 103, 99, 98, 96, 95, 93, 91, 87, 86, 84, 83, 81, 79, 75, 74, 72, 71, 69, 67, 63, 62, 60, 59, 57, 55, 51, 50, 48, 47, 45, 43, 39, 38, 36, 35, 33, 31, 27, 26, 24, 23, 21, 19, 15, 14, 12, 11, 9, 7, 3} ,
{106, 105, 102, 101, 100, 97, 96, 94, 93, 90, 89, 88, 85, 84, 82, 81, 78, 77, 76, 73, 72, 70, 69, 66, 65, 64, 61, 60, 58, 57, 54, 53, 52, 49, 48, 46, 45, 42, 41, 40, 37, 36, 34, 33, 30, 29, 28, 25, 24, 22, 21, 18, 17, 16, 13, 12} ,
{106, 103, 102, 101, 100, 98, 96, 94, 91, 90, 89, 88, 86, 84, 82, 79, 78, 77, 76, 74, 72, 70, 67, 66, 65, 64, 62, 60, 58, 55, 54, 53, 52, 50, 48, 46, 43, 42, 41, 40, 38, 36, 34, 31, 30, 29, 28, 26, 24, 22, 19, 18, 17, 16, 14, 12} ,
{96, 95, 93, 92, 91, 89, 88, 87, 85, 84, 83, 81, 80, 79, 77, 76, 75, 73, 72, 71, 69, 68, 67, 65, 64, 63, 61, 60, 59, 57, 56, 55, 53, 52, 51, 49, 48, 47, 45, 44, 43, 41, 40, 39, 37, 36, 35, 33, 32, 31, 29, 28, 27, 25, 24, 23} ,
{106, 105, 103, 101, 99, 98, 96, 94, 93, 91, 89, 87, 86, 84, 82, 81, 79, 77, 75, 74, 72, 70, 69, 67, 65, 63, 62, 60, 58, 57, 55, 53, 51, 50, 48, 46, 45, 43, 41, 39, 38, 36, 34, 33, 31, 29, 27, 26, 24, 22, 21, 19, 17, 15, 14, 12} ,
{106, 104, 101, 100, 97, 97, 96, 94, 92, 89, 88, 85, 85, 84, 82, 80, 77, 76, 73, 73, 72, 70, 68, 65, 64, 61, 61, 60, 58, 56, 53, 52, 49, 49, 48, 46, 44, 41, 40, 37, 37, 36, 34, 32, 29, 28, 25, 25, 24, 22, 20, 17, 16, 13, 13, 12} ,
{106, 104, 102, 101, 99, 97, 96, 94, 92, 90, 89, 87, 85, 84, 82, 80, 78, 77, 75, 73, 72, 70, 68, 66, 65, 63, 61, 60, 58, 56, 54, 53, 51, 49, 48, 46, 44, 42, 41, 39, 37, 36, 34, 32, 30, 29, 27, 25, 24, 22, 20, 18, 17, 15, 13, 12} ,
{106, 105, 103, 102, 100, 98, 96, 94, 93, 91, 90, 88, 86, 84, 82, 81, 79, 78, 76, 74, 72, 70, 69, 67, 66, 64, 62, 60, 58, 57, 55, 54, 52, 50, 48, 46, 45, 43, 42, 40, 38, 36, 34, 33, 31, 30, 28, 26, 24, 22, 21, 19, 18, 16, 14, 12} ,
{96, 95, 94, 93, 92, 91, 89, 87, 86, 84, 83, 82, 81, 80, 79, 77, 75, 74, 72, 71, 70, 69, 68, 67, 65, 63, 62, 60, 59, 58, 57, 56, 55, 53, 51, 50, 48, 47, 46, 45, 44, 43, 41, 39, 38, 36, 35, 34, 33, 32, 31, 29, 27, 26, 24, 23} ,
{106, 105, 103, 101, 100, 98, 96, 94, 93, 91, 89, 88, 86, 84, 82, 81, 79, 77, 76, 74, 72, 70, 69, 67, 65, 64, 62, 60, 58, 57, 55, 53, 52, 50, 48, 46, 45, 43, 41, 40, 38, 36, 34, 33, 31, 29, 28, 26, 24, 22, 21, 19, 17, 16, 14, 12} ,
{124, 122, 120, 117, 115, 112, 110, 108, 105, 103, 100, 98, 96, 93, 91, 88, 86, 84, 81, 79, 76, 74, 72, 69, 67, 64, 62, 60, 57, 55, 52, 50, 48, 45, 43, 40, 38, 36, 33, 31, 28, 26, 24, 21, 19, 16, 14, 12, 9, 7, 4, 2, 0, 253, 251, 248} ,
{106, 104, 103, 101, 99, 97, 96, 94, 92, 91, 89, 87, 85, 84, 82, 80, 79, 77, 75, 73, 72, 70, 68, 67, 65, 63, 61, 60, 58, 56, 55, 53, 51, 49, 48, 46, 44, 43, 41, 39, 37, 36, 34, 32, 31, 29, 27, 25, 24, 22, 20, 19, 17, 15, 13, 12} ,
{107, 106, 103, 101, 99, 97, 96, 95, 94, 91, 89, 87, 85, 84, 83, 82, 79, 77, 75, 73, 72, 71, 70, 67, 65, 63, 61, 60, 59, 58, 55, 53, 51, 49, 48, 47, 46, 43, 41, 39, 37, 36, 35, 34, 31, 29, 27, 25, 24, 23, 22, 19, 17, 15, 13, 12} ,
{96, 95, 94, 93, 91, 89, 88, 87, 86, 84, 83, 82, 81, 79, 77, 76, 75, 74, 72, 71, 70, 69, 67, 65, 64, 63, 62, 60, 59, 58, 57, 55, 53, 52, 51, 50, 48, 47, 46, 45, 43, 41, 40, 39, 38, 36, 35, 34, 33, 31, 29, 28, 27, 26, 24, 23} ,
{114, 112, 110, 108, 106, 104, 102, 100, 98, 96, 94, 92, 90, 88, 86, 84, 82, 80, 78, 76, 74, 72, 70, 68, 66, 64, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4} ,
{100, 99, 97, 96, 94, 92, 90, 89, 88, 87, 85, 84, 82, 80, 78, 77, 76, 75, 73, 72, 70, 68, 66, 65, 64, 63, 61, 60, 58, 56, 54, 53, 52, 51, 49, 48, 46, 44, 42, 41, 40, 39, 37, 36, 34, 32, 30, 29, 28, 27, 25, 24, 22, 20, 18, 17} ,
{112, 111, 109, 108, 104, 103, 100, 99, 97, 96, 92, 91, 88, 87, 85, 84, 80, 79, 76, 75, 73, 72, 68, 67, 64, 63, 61, 60, 56, 55, 52, 51, 49, 48, 44, 43, 40, 39, 37, 36, 32, 31, 28, 27, 25, 24, 20, 19, 16, 15, 13, 12, 8, 7, 4, 3} ,
{123, 122, 120, 117, 115, 111, 110, 108, 105, 103, 99, 98, 96, 93, 91, 87, 86, 84, 81, 79, 75, 74, 72, 69, 67, 63, 62, 60, 57, 55, 51, 50, 48, 45, 43, 39, 38, 36, 33, 31, 27, 26, 24, 21, 19, 15, 14, 12, 9, 7, 3, 2, 0, 253, 251, 247} ,
{125, 121, 120, 118, 114, 113, 109, 108, 106, 102, 101, 97, 96, 94, 90, 89, 85, 84, 82, 78, 77, 73, 72, 70, 66, 65, 61, 60, 58, 54, 53, 49, 48, 46, 42, 41, 37, 36, 34, 30, 29, 25, 24, 22, 18, 17, 13, 12, 10, 6, 5, 1, 0, 254, 250, 249} ,
{125, 121, 120, 118, 115, 113, 109, 108, 106, 103, 101, 97, 96, 94, 91, 89, 85, 84, 82, 79, 77, 73, 72, 70, 67, 65, 61, 60, 58, 55, 53, 49, 48, 46, 43, 41, 37, 36, 34, 31, 29, 25, 24, 22, 19, 17, 13, 12, 10, 7, 5, 1, 0, 254, 251, 249} ,
{123, 122, 120, 116, 115, 111, 110, 108, 104, 103, 99, 98, 96, 92, 91, 87, 86, 84, 80, 79, 75, 74, 72, 68, 67, 63, 62, 60, 56, 55, 51, 50, 48, 44, 43, 39, 38, 36, 32, 31, 27, 26, 24, 20, 19, 15, 14, 12, 8, 7, 3, 2, 0, 252, 251, 247} ,
{107, 104, 103, 102, 99, 98, 96, 95, 92, 91, 90, 87, 86, 84, 83, 80, 79, 78, 75, 74, 72, 71, 68, 67, 66, 63, 62, 60, 59, 56, 55, 54, 51, 50, 48, 47, 44, 43, 42, 39, 38, 36, 35, 32, 31, 30, 27, 26, 24, 23, 20, 19, 18, 15, 14, 12} ,
{107, 104, 103, 101, 100, 97, 96, 95, 92, 91, 89, 88, 85, 84, 83, 80, 79, 77, 76, 73, 72, 71, 68, 67, 65, 64, 61, 60, 59, 56, 55, 53, 52, 49, 48, 47, 44, 43, 41, 40, 37, 36, 35, 32, 31, 29, 28, 25, 24, 23, 20, 19, 17, 16, 13, 12} ,
{106, 104, 102, 100, 99, 97, 96, 94, 92, 90, 88, 87, 85, 84, 82, 80, 78, 76, 75, 73, 72, 70, 68, 66, 64, 63, 61, 60, 58, 56, 54, 52, 51, 49, 48, 46, 44, 42, 40, 39, 37, 36, 34, 32, 30, 28, 27, 25, 24, 22, 20, 18, 16, 15, 13, 12} ,
{125, 123, 120, 118, 115, 113, 111, 108, 106, 103, 101, 99, 96, 94, 91, 89, 87, 84, 82, 79, 77, 75, 72, 70, 67, 65, 63, 60, 58, 55, 53, 51, 48, 46, 43, 41, 39, 36, 34, 31, 29, 27, 24, 22, 19, 17, 15, 12, 10, 7, 5, 3, 0, 254, 251, 249} 
};

/*

              // adjust encoder ranges to match current layer
              if (layer != LAYERS -1 )
              {
                eScaleOffset.setValue(noteOffset[layer][visible_grid_set] * 4);              // *4's for encoder detents
              }
              eVolume.setValue(volume[layer] * 4);              // *4's for encoder detents

