Random Acts of Vulnerability: Unterschied zwischen den Versionen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 9: | Zeile 9: | ||
= relevant links = | |||
ESP with Arduino: http://hyperdramatik.net/mediawiki/index.php?title=ESP32_mit_Arduino | ESP with Arduino: http://hyperdramatik.net/mediawiki/index.php?title=ESP32_mit_Arduino | ||
| Zeile 17: | Zeile 17: | ||
DOMEs: http://hyperdramatik.net/mediawiki/index.php?title=Dome_Pod_KIT | DOMEs: http://hyperdramatik.net/mediawiki/index.php?title=Dome_Pod_KIT | ||
=== code for sounds in the dating-dome | = code examples from the project = | ||
== Processing code for sounds in the fishing-dome == | |||
CODE DESCRIPTION: | |||
6 textile stretch sensors trigger | |||
6 different sounds | |||
when they pass a threshold. | |||
sound files should be stored in a folder | |||
called "data" within the sketch folder. | |||
<source lang="js" line start="2" highlight="4-6"> | |||
/* | |||
RANDOM ACTS OF VULNERABILITY | |||
code for sounds in the fishing-dome | |||
6 textile stretch sensors trigger | |||
6 different sounds | |||
when they pass a threshold. | |||
sound files should be stored in a folder | |||
called "data" within the sketch folder. | |||
*/ | |||
import processing.serial.*; | |||
import ddf.minim.*; | |||
Serial myPort; | |||
Minim minim; | |||
AudioSample sound0; | |||
AudioSample sound1; | |||
AudioSample sound2; | |||
AudioSample sound3; | |||
AudioSample sound4; | |||
AudioSample sound5; | |||
/////////////////////////////////// | |||
//change these: | |||
/////////////////////////////////// | |||
int numOfSensors = 6; | |||
int ADCmax = 4095; | |||
//int ADCmax = 1023; | |||
float[] sensorThresholds = {1000, 1000, 1000, 1000, 1000, 1000};//new float[numOfSensors]; | |||
/////////////////////////////////// | |||
float[] sensorValues = new float[numOfSensors]; | |||
float[] previousSensorValues = new float[numOfSensors]; | |||
float xpos = 0; | |||
void setup () { | |||
size(600, 400); | |||
smooth(); | |||
background(255); | |||
println(Serial.list()); | |||
String portName = Serial.list()[1]; | |||
myPort = new Serial(this, "/dev/cu.SLAB_USBtoUART", 9600); | |||
myPort.clear(); | |||
myPort.bufferUntil('\n'); | |||
minim = new Minim(this); | |||
sound0 = minim.loadSample( "harddisc_grummeln_kurz.wav", 512); | |||
sound1 = minim.loadSample("crazyfrogbardcore.wav", 512); | |||
sound2 = minim.loadSample("musterfinal.wav", 512); | |||
sound3 = minim.loadSample("harddisc_grummeln_kurz.wav", 512); | |||
sound4 = minim.loadSample("hihat_single.wav", 512); | |||
sound5 = minim.loadSample("kick_single.wav", 512); | |||
} | |||
void draw () { | |||
graph(); | |||
} | |||
void graph() { | |||
for (int i=0; i<numOfSensors; i++) { | |||
if (sensorValues[i] < sensorThresholds[i]) sound(i); | |||
// map the incoming values to an appropriate range: | |||
float ypos = map(sensorValues[i], ADCmax, 0, 0, height/numOfSensors); | |||
// figure out the y position for this particular graph: | |||
float graphBottom = i * height/numOfSensors; | |||
ypos = ypos + graphBottom; | |||
// draw the graph bottoms: | |||
stroke(0); | |||
strokeWeight(1); | |||
line(0, graphBottom, width, graphBottom); | |||
// draw the thresholds: | |||
stroke(200, 0, 0); | |||
strokeWeight(1); | |||
float redLine = map(sensorThresholds[i], ADCmax, 0, 0, height/numOfSensors); | |||
line(0, redLine + graphBottom, width, redLine + graphBottom); | |||
stroke(0); | |||
strokeWeight(2); | |||
line(xpos, previousSensorValues[i], xpos+1, ypos); | |||
previousSensorValues[i] = ypos; | |||
// if you've drawn to the edge of the window, start at the beginning again: | |||
if (xpos >= width) { | |||
xpos = 0; | |||
background(215); | |||
} else xpos+=0.1; | |||
} | |||
} | |||
void serialEvent (Serial myPort) { | |||
// get the ASCII string: | |||
String inString = myPort.readStringUntil('\n'); | |||
// if it's not empty: | |||
if (inString != null) { | |||
// trim off any whitespace: | |||
inString = trim(inString); | |||
// convert to an array of ints: | |||
int incomingValues[] = int(split(inString, "\t")); | |||
if (incomingValues.length <= numOfSensors && incomingValues.length > 0) { | |||
for (int i = 0; i < incomingValues.length; i++) { | |||
sensorValues[i] = incomingValues[i]; | |||
print(sensorValues[i] + "\t"); | |||
} | |||
println(); | |||
} | |||
} | |||
} | |||
void sound(int soundSample) | |||
{ | |||
switch(soundSample) { | |||
case 0: | |||
sound0.trigger(); | |||
break; | |||
case 1: | |||
sound1.trigger(); | |||
break; | |||
case 2: | |||
sound2.trigger(); | |||
break; | |||
case 3: | |||
sound3.trigger(); | |||
break; | |||
case 4: | |||
sound4.trigger(); | |||
break; | |||
case 5: | |||
sound5.trigger(); | |||
break; | |||
} | |||
} | |||
</source> | |||
== code for sounds in the dating-dome == | |||
CODE DESCRIPTION: | CODE DESCRIPTION: | ||
Version vom 25. November 2021, 22:52 Uhr
Random Acts of Vulnerability ist ein immersives Spiel für vier Spieler*innen in vier Dimensionen. Durch Erkundung und Dokumentation der jeweils eigenen Dimension, formen die Spieler*innen anhand des Gesammelten und Erlebten die Erzählungen selbst. Auf ein installatives Netz aus experimentellen Materialen, soften Schaltkreisen, meditativen Klangwelten, grotesken Interfaces und verzerrten Output-Signalen aufbauend, werden Fragen nach Isolation, Einsamkeit, immaterieller und haptischer Vernetzung und der Herstellung von Verhandlungsgrundlagen gestellt.
Eine Arbeit von: Zoe Lohmann, Ella Estrella Tischa Raetzer, Rodolfo Acosta Castro, Lena Böckmann
Video: https://www.youtube.com/watch?v=850KCMYEAow&t=7s
relevant links
ESP with Arduino: http://hyperdramatik.net/mediawiki/index.php?title=ESP32_mit_Arduino
MQTT: http://hyperdramatik.net/mediawiki/index.php?title=Hauptseite#MQTT
DOMEs: http://hyperdramatik.net/mediawiki/index.php?title=Dome_Pod_KIT
code examples from the project
Processing code for sounds in the fishing-dome
CODE DESCRIPTION: 6 textile stretch sensors trigger 6 different sounds when they pass a threshold. sound files should be stored in a folder called "data" within the sketch folder.
/*
RANDOM ACTS OF VULNERABILITY
code for sounds in the fishing-dome
6 textile stretch sensors trigger
6 different sounds
when they pass a threshold.
sound files should be stored in a folder
called "data" within the sketch folder.
*/
import processing.serial.*;
import ddf.minim.*;
Serial myPort;
Minim minim;
AudioSample sound0;
AudioSample sound1;
AudioSample sound2;
AudioSample sound3;
AudioSample sound4;
AudioSample sound5;
///////////////////////////////////
//change these:
///////////////////////////////////
int numOfSensors = 6;
int ADCmax = 4095;
//int ADCmax = 1023;
float[] sensorThresholds = {1000, 1000, 1000, 1000, 1000, 1000};//new float[numOfSensors];
///////////////////////////////////
float[] sensorValues = new float[numOfSensors];
float[] previousSensorValues = new float[numOfSensors];
float xpos = 0;
void setup () {
size(600, 400);
smooth();
background(255);
println(Serial.list());
String portName = Serial.list()[1];
myPort = new Serial(this, "/dev/cu.SLAB_USBtoUART", 9600);
myPort.clear();
myPort.bufferUntil('\n');
minim = new Minim(this);
sound0 = minim.loadSample( "harddisc_grummeln_kurz.wav", 512);
sound1 = minim.loadSample("crazyfrogbardcore.wav", 512);
sound2 = minim.loadSample("musterfinal.wav", 512);
sound3 = minim.loadSample("harddisc_grummeln_kurz.wav", 512);
sound4 = minim.loadSample("hihat_single.wav", 512);
sound5 = minim.loadSample("kick_single.wav", 512);
}
void draw () {
graph();
}
void graph() {
for (int i=0; i<numOfSensors; i++) {
if (sensorValues[i] < sensorThresholds[i]) sound(i);
// map the incoming values to an appropriate range:
float ypos = map(sensorValues[i], ADCmax, 0, 0, height/numOfSensors);
// figure out the y position for this particular graph:
float graphBottom = i * height/numOfSensors;
ypos = ypos + graphBottom;
// draw the graph bottoms:
stroke(0);
strokeWeight(1);
line(0, graphBottom, width, graphBottom);
// draw the thresholds:
stroke(200, 0, 0);
strokeWeight(1);
float redLine = map(sensorThresholds[i], ADCmax, 0, 0, height/numOfSensors);
line(0, redLine + graphBottom, width, redLine + graphBottom);
stroke(0);
strokeWeight(2);
line(xpos, previousSensorValues[i], xpos+1, ypos);
previousSensorValues[i] = ypos;
// if you've drawn to the edge of the window, start at the beginning again:
if (xpos >= width) {
xpos = 0;
background(215);
} else xpos+=0.1;
}
}
void serialEvent (Serial myPort) {
// get the ASCII string:
String inString = myPort.readStringUntil('\n');
// if it's not empty:
if (inString != null) {
// trim off any whitespace:
inString = trim(inString);
// convert to an array of ints:
int incomingValues[] = int(split(inString, "\t"));
if (incomingValues.length <= numOfSensors && incomingValues.length > 0) {
for (int i = 0; i < incomingValues.length; i++) {
sensorValues[i] = incomingValues[i];
print(sensorValues[i] + "\t");
}
println();
}
}
}
void sound(int soundSample)
{
switch(soundSample) {
case 0:
sound0.trigger();
break;
case 1:
sound1.trigger();
break;
case 2:
sound2.trigger();
break;
case 3:
sound3.trigger();
break;
case 4:
sound4.trigger();
break;
case 5:
sound5.trigger();
break;
}
}
code for sounds in the dating-dome
CODE DESCRIPTION: 4 very sensitive "balloon-pushbuttons" on a makey makey trigger sound files. every minute there is a scene change and the sound files are updated. sound files should be stored in a folder called "data" within the sketch folder.
/*
RANDOM ACTS OF VULNERABILITY
code for sounds in the dating-dome
4 very sensitive "balloon-pushbuttons"
on a makey makey trigger sound files.
every minute there is a scene change
and the sound files are updated.
sound files should be stored in a folder
called "data" within the sketch folder.
*/
import ddf.minim.*;
Minim minim;
AudioSample sound0;
AudioSample sound1;
AudioSample sound2;
AudioSample sound3;
AudioSample sound4;
AudioSample sound5;
int delayTime = 800;
boolean w_released = true;
boolean d_released = true;
boolean s_released = true;
boolean a_released = true;
int maxCount = 3;
int w_count = 0;
int a_count = 0;
int s_count = 0;
int d_count = 0;
int szene = 0;
int previousSzene;
int soundChangeInterval = 5000;
void setup () {
size(1000, 800);
smooth();
minim = new Minim(this);
background(255);
}
void draw () {
szene = minute() % 3;
if (szene != previousSzene) {
previousSzene = szene;
println(szene);
if (szene == 0) {
sound0 = minim.loadSample("be.wav", 1000);
sound1 = minim.loadSample("come.wav", 1000);
sound2 = minim.loadSample("together.wav", 1000);
sound3 = minim.loadSample("withMe.wav", 1000);
}
if (szene == 1) {
sound0 = minim.loadSample("hihat_single.wav", 1000);
sound1 = minim.loadSample("hihat_single.wav", 1000);
sound2 = minim.loadSample("hihat_single.wav", 1000);
sound3 = minim.loadSample("hihat_single.wav", 1000);
}
if (szene == 2) {
sound0 = minim.loadSample("kick_single.wav", 1000);
sound1 = minim.loadSample("kick_single.wav", 1000);
sound2 = minim.loadSample("kick_single.wav", 1000);
sound3 = minim.loadSample("kick_single.wav", 1000);
}
}
}
void keyPressed() {
if ((key == 'w' || key == 'W') && w_released == true && w_count < maxCount) {
background(0);
w_released = false;
sound(0);
delay(delayTime);
w_count ++;
a_count = 0;
s_count = 0;
d_count = 0;
}
if ((key == 'a' || key == 'A') && a_released == true && a_count < maxCount) {
background(200, 0, 0);
a_released = false;
sound(1);
delay(delayTime);
a_count ++;
w_count = 0;
s_count = 0;
d_count = 0;
}
if ((key == 's' || key == 'S') && s_released == true && s_count < maxCount) {
background(0, 200, 0);
s_released = false;
sound(2);
delay(delayTime);
s_count ++;
w_count = 0;
a_count = 0;
d_count = 0;
}
if ((key == 'd' || key == 'D') && d_released == true && d_count < maxCount) {
background(0, 0, 200);
d_released = false;
sound(3);
delay(delayTime);
d_count ++;
w_count = 0;
a_count = 0;
s_count = 0;
}
}
void keyReleased() {
if (key == 'd' || key == 'D') {
d_released = true;
}
if (key == 'a' || key == 'A') {
a_released = true;
}
if (key == 's' || key == 'S') {
s_released = true;
}
if (key == 'w' || key == 'W') {
w_released = true;
}
}
void sound(int soundSample)
{
switch(soundSample) {
case 0:
sound0.trigger();
break;
case 1:
sound1.trigger();
break;
case 2:
sound2.trigger();
break;
case 3:
sound3.trigger();
break;
}
}
}