Come experiment with us!

sound equipment_MG_3073 copy

 

Brain Drain is an ongoing postgraduate students’ project at ECA.

We are happy to invite you to experiment with us!

Design and Digital Media Msc students are working together with Sound Design and Acoustics Msc students towards the creation of an interactive arts installation, under the supervision of Professor Richard Coyne and PhD student Dorothea Kalogianni.

 

 

—————————————————————————————————-

The innovation of the installation is that it uses a brain interface with the help of portable EEG (electroencephalography).

We are running some experiments that will help us understand how to improve our installation and the user experience. And we would be very happy if you came over and experimented with our installation!

The experimentation time will only take 20 to 30 minutes! And we will offer you a cup of coffee as well as some sweet treat ūüôā

Here is the link of a brief introduction video of our porject:
Video: www.youtube.com/watch?v=dWghvaV_RFg

The experiments will take place on Friday the 14th, Saturday the 15th, Friday the 21st and Saturday the 22nd of March.

On Fridays the experiments will take place from 14:00 to 17:30 and on Saturdays from 13:00 to 16:30. Below is a doodle link that you can use to book your desired slot. This way there will be no undesired waiting times.

doodle.com/ph7r6h6xdr37r4qa

ps: We would like you to wear an absolutely safe and easily worn portable EEG headset (emotiv.com/)

Looking forward to seeing you!

 

Visualization prototype: Genetative Polygon

)

)

Previous version

Visualization prototype: Geometric boxes with Colours

Effects

  1. change of object shapes
  2. separate engagement from boredom

This “generative Polygon” is improved version of “geometric boxes”. ¬†The first recognizable modification is object shapes. ¬†I changed object shapes from boxes to polygon because it is easy to change shapes for each emotion. ¬†Also, ¬†this code distinguishes engagement and boredom. ¬†Previous codes could not distinguish between them because a headset reads two emotions together. ¬†In the code, output value 0~50 are set to engagement, value 51~100 are set to boredom. ¬†Each motion of five emotions are as below.

  • Excitement: multiplying objects
  • Engagement: rotating
  • Boredom: moving around
  • Frustration: trembling
  • Meditation: ¬†changing the number of shape points

Visualization prototype: Geometric boxes with Colours

Previous works

This prototype is new version of previous Geometric boxes code.

Playing with colours

We got some suggestions to play with colours in our visualization. We’ve focused on creating more active motions rather than playing with colours because of colour-blindness issues. ¬†In this code, I added a colour function as a complementary function.

The colour shows the strongest emotion in four emotion parameters.

  • Excitement: red
  • Engagement: yellow
  • Frustration: green
  • Meditation: blue

Code is here.

dmsp.digital.eca.ed.ac.uk/blog/braindrain2014/2014/03/11/visualization-prototype-geometric-boxes-with-colours-2/

Visualization prototype: Alert for headset problems

This prototype is improved version of Visualization prototype: Geometric visualization.

The EEG headset often doesn’t work properly. ¬†Most common problem is disconnection of sensors. ¬†To discover these problems, I added an alert function that shows another motion if the headset has problems.

Method

Every 10 seconds, the code saves four emotion values as temporary values to compare previous value and current value.  If previous value and current value are totally same, it means the headset does not work properly.

  1. Every 10 seconds: check each value.
    -excitement 11, engagement 22, frustration 33, meditation 44
  2. Save as temporary values.
    -excitementTemp 11,  engagementTemp 22, frustrationTemp 33, meditationTemp 44
  3. After 10 seconds, check current values.
    excitement 44, engagement 88, frustration 33, meditation 66
  4. Compare all previous temporary values (10 seconds ago) and current values
    excitement==excitementTemp? engagement==engagementTemp? …
  5. If both value are same, alert function starts.
    frustration == frustrationTemp=33 (same!) = Headset is not sending values!

Effects

In the prototype, the code shows noisy lines in the screen.

B28 in ECA main building

Image

We went to B28, the sound studio in the ECA main building this afternoon and got those photos to help ourselves to discuss the relationship between the space and our project designs. Also would be convenient for us to get started with designing the interfaces.

DSC_0102 DSC_0108 DSC_0121 sound equipment potential wall for projection DSC_0131_gDSC_0124

button controls servo_windChime

// Sweep
// by BARRAGAN <barraganstudio.com&gt;
// This example code is in the public domain.
#include <Servo.h>

const int buttonPin = 2;
const int servoPin = 9;

int buttonState = 0;
int lastButtonState = 0;
int count =0;
boolean state=0;

Servo myservo; // create servo object to control a servo
// a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position

void setup()
{
myservo.attach(9); // attaches the servo on pin 9 to the servo object
pinMode(buttonPin, INPUT);
pinMode(servoPin, OUTPUT);
Serial.begin(9600);

}

void loop()
{

buttonState = digitalRead(buttonPin);
if(buttonState!=lastButtonState){count++;}
if(count%2==1){state=1;}
else if(count%2==0){state=0;}
if(state==1){
for(pos = 0; pos < 180; pos += 7) // goes from 0 degrees to 180 degrees
{ // in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
for(pos = 180; pos>=1; pos-=1) // goes from 180 degrees to 0 degrees
{
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
}
}
else if(state==0){myservo.write(0);}
lastButtonState=buttonState;
Serial.print(0,0);
}

code for button control toy motor_woodenFish

#include <Button.h>

const int motorPin = 9; // define the pin the motor is connected to
// (if you use pin 9,10,11 or 3you can also control speed)
const int buttonPin = 2;

//Button button = Button(2,PULLUP);
int buttonState = 0;
int lastButtonState = 0;
int count = 0;
boolean state = 0;
/*
* setup() – this function runs once when you turn your Arduino on
* We set the motors pin to be an output (turning the pin high (+5v) or low (ground) (-))
* rather than an input (checking whether a pin is high or low)
*/
void setup()
{
pinMode(motorPin, OUTPUT);
pinMode(buttonPin, INPUT);
}
/*
* loop() – this function will start after setup finishes and then repeat
* we call a function called motorOnThenOff()
*/

void loop() // run over and over again
{
motorOnThenOff();

void motorOnThenOff(){
int onTime = 2500; //the number of milliseconds for the motor to turn on for
int offTime = 1000; //the number of milliseconds for the motor to turn off for

buttonState = digitalRead(buttonPin);

if(button.isPressed()){
digitalWrite(buttonPin, HIGH);
}else{
digitalWrite(buttonPin, LOW);
}

if(buttonState == HIGH){
// state = 1;
digitalWrite(motorPin, LOW); // turns the motor On
//delay(onTime); // waits for onTime milliseconds
//digitalWrite(motorPin, LOW); // turns the motor Off
//delay(offTime); // waits for offTime milliseconds
}
else{
//state = 0;
digitalWrite(motorPin, HIGH); // turns the motor On
}

}
}
}

code for light sensor controlled by button

/*
Pitch follower

Plays a pitch that changes based on a changing analog input

circuit:
* 8-ohm speaker on digital pin 9
* photoresistor on analog 0 to 5V
* 4.7K resistor on analog 0 to ground

created 21 Jan 2010
modified 31 May 2012
by Tom Igoe, with suggestion from Michael Flynn

This example code is in the public domain.

arduino.cc/en/Tutorial/Tone2

*/
int inPin = 2;
int outPin = 9;
int state = HIGH;
int reading;
int previous = LOW;
long time = 0; // the last time the output pin was toggled
long debounce = 200;
void setup() {
// initialize serial communications (for debugging only):
Serial.begin(9600);
pinMode(inPin, INPUT);
pinMode(outPin, OUTPUT);
// read the sensor:
}

void loop() {
reading = digitalRead(inPin);
if(reading == HIGH && previous == LOW && millis() – time > debounce){
if (state == HIGH)
state = LOW;
else
state = HIGH;

time = millis();

}

digitalWrite(outPin, state);
previous = reading;

if(state == LOW){

int sensorReading = analogRead(A0);
Serial.println(sensorReading);
// map the analog input range (in this case, 400 – 1000 from the photoresistor)
// to the output pitch range (120 – 1500Hz)
// change the minimum and maximum input numbers below
// depending on the range your sensor’s giving:
int thisPitch = map(sensorReading, 10, 300, 90, 2500);

// play the pitch:
tone(9, thisPitch, 3.9);
delay(4); // delay in between reads for stability
}

if(state == HIGH){
//noTone(9);
int sensorReading = analogRead(A0);
Serial.println(sensorReading);
// map the analog input range (in this case, 400 – 1000 from the photoresistor)
// to the output pitch range (120 – 1500Hz)
// change the minimum and maximum input numbers below
// depending on the range your sensor’s giving:
int thisPitch = map(sensorReading, 10, 300, 0, 0);

}

}