 int pos;
 // sequence-bits
 int bs[] = {1, 2, 4, 8, 16, 32, 64, 128, 256};
+
+int instrument_1_seq[8];
+int instrument_2_seq[8];
 
 const String sampleFolder = "/mnt/twitterOrchestra/samples/";
 

  }
  if (tag == 0)
    playSample(msg.substring(hashInd + 4));
  else {
    tag--;
    // pattern
    String pa = msg.substring(hashInd + 4, hashInd + 4 + patternL);
    if (pa.charAt(0) == 'p') {
      playDrumSample(s);
    }
    byte pattern = 0;
    Serial.println(pa);
    for (int i = 0; i < patternL; i++) {
      pattern = pattern << 1;
      byte b = pa.charAt(i) == '1' ? 1 : 0;
      pattern += b;
    }
    Serial.println(pattern);
    patterns[tag] = pattern;
  }
}

void playSample(String sampleName) {
  Process p;
  p.runShellCommandAsynchronously("madplay " + sampleFolder + sampleName+".wav");
}

void playDrumSample(String sampleName) {
  
  }

#include <Process.h>

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
const int DRUMSSTART = 1;
const int DRUMSEND = 5;
const int INSTRUMENTSTART = 6;
const int INSTRUMENTEND = 7;
const int EFFECTSTART = 8;
const int EFFECTEND = 10;
//
const int numIns = 6;
byte patterns[numIns - 1];
