We are about to switch to a new forum software. Until then we have removed the registration on this forum.
So basically I have been trying to embed a video I made ino the program that I am running. Basically if you run the program with an emotiv epoc and osc messages it will display certain emtiions. I want to see the emotions being displayed while watching the video in the background or somewhere on the rpocessing sketch. When I run the sketch, the emotion code for the epoc runs and I noticed the audio for the movie plays but displays no movie. Here is my code:
import processing.video.*; Movie myMovie; PFont f; import oscP5.*; import netP5.*;
public float engBor = 0; // Engaged/Bored public float exc = 0; // Excitement public float excLon = 0; // Excitement Long Term public float med = 0; // Meditation public float fru = 0; // Frustration
OscP5 oscP5;
void setup() {
myMovie=new Movie(this,"sadmachine3.mov"); myMovie.loop(); image(myMovie,mouseX,mouseY);
size(960, 720); frame.removeNotify(); frame.setUndecorated(true); frame.addNotify();
f = loadFont( "ArialMT-36.vlw" );
frameRate(30); smooth();
/* start oscP5, listening for incoming messages on port 7400 make sure this matches the port in Mind Your OSCs */ oscP5 = new OscP5(this, 7400);
// plug the OSC messages for the Affectiv values oscP5.plug(this, "updateEngBor", "/AFF/Engaged/Bored"); oscP5.plug(this, "updateExc", "/AFF/Excitement"); oscP5.plug(this, "updateExcLon", "/AFF/Excitement Long Term"); oscP5.plug(this, "updateMed", "/AFF/Meditation"); oscP5.plug(this, "updateFru", "/AFF/Frustration"); }
void draw() {
textFont(f, 15); stroke(0, 255, 0); fill(255, 255, 0);
text ( "Engaged/Bored", 110, 200); fill(150, 255, 150); text ( "Excited", 295, 200); fill(255, 0, 200); text ( "Confused", 450, 200); fill(255, 100, 155); text ( "Relaxed", 610, 200); fill(255, 255, 255); text ( "Frustrated", 765, 200);
fill(0, 10); rectMode(CORNER); rect(0, 0, width, height);
drawCircle(engBor, 1); // circle 1: Engaged/Bored
drawCircle(exc, 2); // circle 2: Excitement drawCircle(excLon, 3); // circle 3: Excitement Long Term drawCircle(med, 4); // circle 4: Meditation drawCircle(fru, 5); // circle 5: Frustration
}
void drawCircle(float affVal, int circleNo) { fill(100, 100, 255, 5); strokeWeight(4);
ellipseMode(CENTER); stroke(255, 0, 0); float diam = map(affVal, 0, 1, 1, width/5); ellipse((width/6)*circleNo, height/2, diam, diam); }
public void updateEngBor(float theValue) { engBor = theValue; }
public void updateExc(float theValue) { exc = theValue; }
public void updateExcLon(float theValue) { excLon = theValue; }
public void updateMed(float theValue) { med = theValue; }
public void updateFru(float theValue) { fru = theValue; }
Answers
I also noticed the audio plays but seems to cut out a lot of the time. How do I fix this giant mess?
http://forum.processing.org/two/discussion/8045/how-to-format-code-and-text
how does that relate to my question? I need help overlaying the video into the code not formatting text.
he did the same thing for me but i get it.. dude what you posted is just plain hard to read. just putting a <!pre> before your code and a <!/pre> after would put it in a block so we can read it... (take out the ! makes and it works)
ex:
Try to read your own message: we cannot do anything with the mess of your code, until you edit your message and format your text / code.