Théorie sur le son, les ondes et la communication chez les insectes, et synthèse des sons d'insectes sur différentes interfaces numérique et électronique pour créer un orchestre interactif ludique de criquets, moustique, mouches a spatialiser.
Grillon simple
int piezo = 9;
int pattern= 8 ;
void setup() {
pinMode(piezo, OUTPUT);
}
void loop() {
for (int i=0; i <= pattern; i++){
cricket();
delay(100);
}
}
void cricket() {
for (int i=0; i <= 5; i++){
{
digitalWrite(piezo, HIGH); // turn the piezo on (HIGH is the voltage level)
delay(random(15)+3);
digitalWrite(piezo, LOW); // turn the piezo off by making the voltage LOW
delay(15);
}}}
Cigale et sauterelle
int led = 9;
int pattern= 8 ;
void setup() {
pinMode(led, OUTPUT);
}
void loop() {
for (int i=0; i <= pattern; i++){
cricket();
delay(100);
}
delay(333);
for (int i=0; i <= pattern; i++){
sauterelle();
delay(200);
}
delay(333);
for (int i=0; i <= pattern; i++){
treeble();
delay(300);
}
delay(333);
}
void cricket() {
for (int i=0; i <= 5; i++){
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(random(15)+3);
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(15);
}
}
void sauterelle() {
for (int i=0; i <= 5; i++){
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(random(40)+20);
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(30);
}
}
void treeble() {
for (int i=0; i <= 15; i++){
tone(led, i*1000,10);
delay(random(3));
}
}
Noise piezo
int hp = 6;
void setup() {
// put your setup code here, to run once:
pinMode(hp, OUTPUT);
}
void loop() {
playNoise (random( 1000) , random( 3) + 10);
delay(random (10)+50);
}
void playNoise(int sustain , float duration)
{
long stopTime =micros() +1000*duration;
while ( micros() < stopTime ) {
if (random(100) < 50)
digitalWrite (hp, HIGH);
else
digitalWrite (hp, LOW);
delayMicroseconds(sustain);
}
}