 #include <Process.h>
 
-
-String instruments[] = {"PS", "BD", "SD","KI","SN","CR"};
+String hashTags[] = {"PS", "BD", "SD", "KI", "SN", "CR","I1","I2"};
 //PS: play sample, BD: bass drum, SD: snare, KI: kick,SN: snare, CR: crash
+//I1: instrument 1, I2: instrument 2
+// marker // TODO
+int drumsStart = 1;
+int drumsEnd = 5;
+int instrumentStart = 6;
+int instrumentEnd = 7;
+//
 const int numIns = 6;
-byte patterns[numIns-1];
+byte patterns[numIns - 1];
 // length
 const int patternL = 8;
 

  // instrument
  if (hashInd == -1)
    return;
  int instrument = 0;
  String s = msg.substring(hashInd + 1, hashInd + 3);
  for (int i = 0; i < numIns; i++) {
    if (s == instruments[i]) {
      instrument = i;
      Serial.println(s);
      break;
    }
  }
  if (instrument == 0)
    playSample(msg.substring(hashInd + 4));
  else {
    instrument--;
    // pattern
    String pa = msg.substring(hashInd + 4, hashInd + 4 + patternL);
    byte pattern = 0;
    Serial.println(pa);
    for (int i = 0; i < patternL; i++) {

  if (time > nextB) {
    nextB += nextBInc;
    for (int i = 1; i < numIns; i++) {
      if (patterns[i - 1] & bs[pos])
        Serial.print(hashTags[i]);
      else
        Serial.print("..");
      Serial.print("-");
    }
    Serial.println("");
    pos = (pos + 1) % patternL;
