Lap Lap FYP BLOG
2011年2月26日 星期六
2011年2月16日 星期三
2011年2月1日 星期二
processing program
two point detection succeed
can adjust the sensitivity even work in a room light condition
import processing.video.*;
import ddf.minim.*;
AudioPlayer player;
AudioPlayer player2;
Minim minim;
Minim minim2;
Capture video;
void setup()
{
size(1024, 400);
minim = new Minim(this);
minim2 = new Minim(this);
player = minim.loadFile("try2.mp3", 2048);
player2 = minim2.loadFile("kick.mp3", 2048);
// player2 = minim2.loadFile("kick.mp3", 1024);
// The name of the capture device is dependent those
// plugged into the computer. To get a list of the
// choices, uncomment the following line
// println(Capture.list());
// And to specify the camera, replace "Camera Name"
// in the next line with one from Capture.list()
// myCapture = new Capture(this, width, height, "Camera Name", 30);
// This code will try to use the last device used
// by a QuickTime program
video = new Capture(this, width, height, 24);
//player.loop();
}
void draw() {
// video.read(); //must
image(video, 0, 0); //must
if (video.available()) {
boolean p = (false);
boolean p2 = (false);
video.read();
video.loadPixels();//make it can calculate
int point1=video.get(64,63);
int point2=video.get(128,63);
float point1bright= brightness(point1);
float point2bright= brightness(point2);
point(64,64);
point(127,64);
if (point1bright<230){
println("dark") ;
// player.play();
// player.loop();
// p=(true);
//player.pause();
}
//if (p==false) end
if ( player.isPlaying()) {}
else{
if (point1bright>230){
println("bright") ;
player.loop();
player.play(); }
}
if (point2bright<230){
println("dark2") ;
// player.play();
// player.loop();
// p=(true);
//player.pause();
}
//if (p==false) end
if ( player2.isPlaying()) {}
else{
if (point2bright>230){
println("bright2") ;
player2.loop();
player2.play(); }
}
}//available end
}//draw end
can adjust the sensitivity even work in a room light condition
import processing.video.*;
import ddf.minim.*;
AudioPlayer player;
AudioPlayer player2;
Minim minim;
Minim minim2;
Capture video;
void setup()
{
size(1024, 400);
minim = new Minim(this);
minim2 = new Minim(this);
player = minim.loadFile("try2.mp3", 2048);
player2 = minim2.loadFile("kick.mp3", 2048);
// player2 = minim2.loadFile("kick.mp3", 1024);
// The name of the capture device is dependent those
// plugged into the computer. To get a list of the
// choices, uncomment the following line
// println(Capture.list());
// And to specify the camera, replace "Camera Name"
// in the next line with one from Capture.list()
// myCapture = new Capture(this, width, height, "Camera Name", 30);
// This code will try to use the last device used
// by a QuickTime program
video = new Capture(this, width, height, 24);
//player.loop();
}
void draw() {
// video.read(); //must
image(video, 0, 0); //must
if (video.available()) {
boolean p = (false);
boolean p2 = (false);
video.read();
video.loadPixels();//make it can calculate
int point1=video.get(64,63);
int point2=video.get(128,63);
float point1bright= brightness(point1);
float point2bright= brightness(point2);
point(64,64);
point(127,64);
if (point1bright<230){
println("dark") ;
// player.play();
// player.loop();
// p=(true);
//player.pause();
}
//if (p==false) end
if ( player.isPlaying()) {}
else{
if (point1bright>230){
println("bright") ;
player.loop();
player.play(); }
}
if (point2bright<230){
println("dark2") ;
// player.play();
// player.loop();
// p=(true);
//player.pause();
}
//if (p==false) end
if ( player2.isPlaying()) {}
else{
if (point2bright>230){
println("bright2") ;
player2.loop();
player2.play(); }
}
}//available end
}//draw end
2011年1月29日 星期六
2011年1月23日 星期日
2011年1月20日 星期四
making of EL wire part 1
how to solder el wire tutorial online
materials from tao bao:
3.2mm El wire (3Meter)
3.2mm El wire (3Meter)
Sound control driver
12V battery case(AAx8)
connecters
2011年1月9日 星期日
EL wire idea
el wire introduction
http://en.wikipedia.org/wiki/El_wire
structure of EL wire
make a portable and voice control el wire device!
Then put it on a T-shirt
T-shirt sample made by others
http://en.wikipedia.org/wiki/El_wire
structure of EL wire
make a portable and voice control el wire device!
Then put it on a T-shirt
T-shirt sample made by others
訂閱:
文章 (Atom)