 #define OLED_RESET  D5
 Adafruit_SSD1306 Display(OLED_DC, OLED_RESET, OLED_CS);
 
-#define ALARM_LENGTH 10000
+#define ALARM_LENGTH 30000
 AlarmManager alarms = AlarmManager();
 
 #define STARTUP_LENGTH 10000
 #define INTERVAL 100
 
+uint16_t speakerPin = D0;
+
+String song = "SMBtheme:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6";
+
+#define NOTE_C 131
+#define NOTE_D 147
+#define NOTE_E 165
+#define NOTE_F 175
+#define NOTE_G 196
+#define NOTE_A 220
+#define NOTE_B 247
+#define NOTE_P   0
+
+uint8_t default_duration = 4;
+uint8_t default_octave   = 5;
+
+uint8_t min_octave = 3;
+
+uint16_t note;
+uint8_t octave;
+uint8_t bpm = 63;
+long wholenote;
+long duration = 0L;
+
+StringStream *iterator;
+
 unsigned long stateMillis;
 unsigned long previousMillis;
 

void setup() {
  Display.begin(SSD1306_SWITCHCAPVCC);

  Spark.function("add", add);
  Spark.function("remove", remove);
  Spark.function("clear", clear);

  RGB.control(true);
  RGB.color(0, 255, 255);
  RGB.brightness(0);

  Display.display();
  Display.setTextColor(WHITE);

  Time.zone(-5);

  alarms.load();
}


  stateMachine.update();
}

void updateStart() {
  if(Spark.connected()) { // Until I get the battery and supercap
    stateMachine.transitionTo(Clock);
  }
}

void exitStart() {
  RGB.control(true);
  RGB.color(0, 0, 0);
  RGB.brightness(0);
}

void updateClock() {
  unsigned long currentMillis = millis();
  uint8_t currentMinute = Time.minute();

  render();

  if(currentMinute != previousMinute) {
    previousMinute = currentMinute;
