 	int16_t value;				// value of encoder
 	int16_t min_value;			// min value encoder can have
 	int16_t max_value;			// max value encoder can have
+	uint8_t control_number;		// control number
 } encoder_t;
 
 #define ENCODERS 8
 // setup the encoder data structures
 encoder_t encoders[ENCODERS] = {
-	{ &mcp0, 0, 1, 2,    true, true, false, 0, 0, 20 },
-	{ &mcp0, 3, 4, 5,    true, true, false, 0, 0, 20 },
-	{ &mcp0, 8, 9, 10,   true, true, false, 0, 0, 20 },
-	{ &mcp0, 11, 12, 13, true, true, false, 0, 0, 20 },
-	{ &mcp1, 0, 1, 2,    true, true, false, 0, 0, 20 },
-	{ &mcp1, 3, 4, 5,    true, true, false, 0, 0, 20 },
-	{ &mcp1, 8, 9, 10,   true, true, false, 0, 0, 20 },
-	{ &mcp1, 11, 12, 13, true, true, false, 0, 0, 20 }
+	{ &mcp0, 0, 1, 2,    true, true, false, 63, 0, 127, 70 },
+	{ &mcp0, 3, 4, 5,    true, true, false, 63, 0, 127, 71 },
+	{ &mcp0, 8, 9, 10,   true, true, false, 63, 0, 127, 72 },
+	{ &mcp0, 11, 12, 13, true, true, false, 63, 0, 127, 73 },
+	{ &mcp1, 0, 1, 2,    true, true, false, 63, 0, 127, 74 },
+	{ &mcp1, 3, 4, 5,    true, true, false, 63, 0, 127, 75 },
+	{ &mcp1, 8, 9, 10,   true, true, false, 63, 0, 127, 76 },
+	{ &mcp1, 11, 12, 13, true, true, false, 63, 0, 127, 77 }
 };
 
 typedef struct button {

				Serial1.print("event with magnitude: ");
				Serial1.println(event_magnitude, DEC);
#endif
			}
		// if we are in recovery state and the analog voltage has reached baseline again IDLE the event
		} else if (strings[i].state == RECOVER && value >  strings[i].baseline_value - (strings[i].baseline_value / STRING_LEVEL_EVENT_PERCENT_CHANGE)) {

			Serial1.print(i, DEC);
			Serial1.println("is idle again");
#endif
#ifdef MIDI
			usbMIDI.sendNoteOff(strings[i].note, 0, channel);
#endif
		}
		strings[i].value = value;
	}

#ifdef MIDI
	// discard incoming messages
	while (usbMIDI.read());

	// send any pending messages
	usbMIDI.send_now();
#endif
}
