 
 #include <Adafruit_MotorShield.h>
 #include "utility/Adafruit_PWMServoDriver.h"
+
+#include <GinSing.h>   
 
 #define BAUD             115200
 #define LIGHT_SENSOR_PIN      0


}


void SendMIDI(char cmd, char data1, char data2) 
{
  if (gMute == false)
  {
    Serial.print(cmd);
    Serial.print(data1);
    Serial.print(data2);
  }
}


void waitForNote(int note) 
{
  static bool noteStates[NOTE_COUNT_MAX] = {0};
  bool detected = false;
  bool currentlyOn = noteStates[note];
  unsigned long duration = millis() + gMotorStepDelay;
  while (millis() < duration)
  {
    int light = analogRead(LIGHT_SENSOR_PIN);


void setNoteCountCmd() 
{
  Serial.print(F("Running ")); Serial.println(__FUNCTION__);

  char * str = sCmd.next();
  if (str && *str)
  {
    int val = atoi(str);
    if (val > 1 && val <= NOTE_COUNT_MAX)
    {
      Serial.print(F("Before: ")); Serial.println(gNoteCount);
      gNoteCount = val;
