Try to create a distant sensor with resistive material for thread of the violonPoule.

Fading a RGB Led with this distant sensor thread and modification by touching thread with fingers.

//Tablature essai
// 02/04/2011
//By Martin De Bie

int tablature1= A0;
int tablature2= A1;
int tablatureValue1;
int tablatureLed1;
int tablatureValue2;
int tablatureLed2;
int green = 9;
int blue = 10;
int red = 11;

void setup () {
Serial.begin (9600);
digitalWrite(14, HIGH);
digitalWrite(15, HIGH);
pinMode (tablature1, INPUT);
pinMode (tablature2, INPUT);
pinMode (red, OUTPUT);
pinMode (green, OUTPUT);
pinMode (blue, OUTPUT);
}

void loop () {
//1 lecture valeur tablature
tablatureValue1=analogRead(tablature1);
tablatureLed1 = map (tablatureValue1, 0, 1024, 255, 0);
//2 lecture valeur tablature
tablatureValue2=analogRead(tablature2);
tablatureLed2 = map (tablatureValue2, 0, 1024, 255, 0);

Serial.println (tablatureLed1);

analogWrite (blue, tablatureLed1);
analogWrite (green, tablatureLed2);
if (tablatureLed1 digitalWrite(blue, LOW);
}
if (tablatureLed2<10) {
digitalWrite(green, LOW);
}
}