 	    sendOSCMessage(noteMsg, 0);
 	}
 }
+void startNote(unsigned int note, unsigned int velocity)
+{
+    String prefix  =  "/vkb_midi/0/note/";
+	String noteMsg = prefix + String(note);
+	sendOSCMessage(noteMsg, velocity);
 
+}
+void stopNote(unsigned int note)
+{
+    String prefix  =  "/vkb_midi/0/note/";
+	String noteMsg = prefix + String(note);
+	sendOSCMessage(noteMsg, 0);
 
+}
 void sendCC(unsigned int nb, unsigned int value)
 {
     String prefix = "/vkb_midi/0/cc/";

char pass[] = "xxx";       // your network password

WiFiUDP Udp;                                // A UDP instance to let us send and receive packets over UDP
const IPAddress outIp(192,168,1,51);        // remote IP of your computer
const unsigned int outPort = 8000;          // remote port to receive OSC
const unsigned int localPort = 8888;        // local port to listen for OSC packets (actually not used for sending)



    Serial.println("sending first note");
	
	//sendNote(45, 120, -1);
    bool isPlaying = 0;
	while (1)
	{
	    int val = digitalRead(D5);
		int analogVal = analogRead(A0);
		
		Serial.print("New value : ");
		Serial.println(val);
	    Serial.print("Analog : ");
		Serial.println(analogVal);
		if (isPlaying == 0)
		{
		    if(val != 1)
		    {
		        startNote(65, 80);
				startNote(53, 120);
				startNote(41, 120);
	            isPlaying = 1;
			}
		}
		else
		{
			if(val == 1)
		    {
		        stopNote(65);
				stopNote(53);
				stopNote(41);
	            isPlaying = 0;
			}
  
	    }
		delay(5);
	}
	
    while(1){

    	  accel.getEvent(&event);
