Catégories
Liens
Ceci est une ancienne révision du document !
L'oreille humaine capte les vibrations acoustiques a certaines fréquences. Mais l'univers est parcouru de nombreuses vibrations, la lumière, les champs électromagnétiques, les pulsations physiques. La présentation / atelier consistera en l'explication et la démonstration de comment capter ces ondes, les rendre audibles ainsi que les manipuler avec des interfaces diy. Notamment en essayant de capter et synthetiser les sons des insectes et autres animaux qui communiquent a d'autres fréquences.
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); }}} <code> ++++ ++++ Cigale et sauterelle | <code c+> 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)); } }
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); } }