import ddf.minim.*; Minim minim; AudioPlayer player; PImage a1,a2,a3; void setup(){ size(640,480); a1=loadImage("a1.png"); a2=loadImage("a2.jpg"); a3=loadImage("a3.png"); minim = new Minim(this); player = minim.loadFile("groove.mp3", 2048);; } int state=0; int startT; int computerOutput=0; void draw(){ background(255); if(state==0){ image(a1, 0,0); if(millis()-startT>2000){ state=2; if( ! player.isPlaying()){ player.rewind(); player.play(); } } }else if(state==1){ }else if(state==2){ if(millis()-startT>2000){ computerOutput=int(random(2)); startT=millis(); image(a1,500,300); } if(computerOutput==0) image(a2,0,0); else image(a3,0,0); } } void keyPressed(){ if(key=='1'){ }else if(key=='2'){ startT=millis(); }else if(key=='3'){ } }
2013體感互動課程Blog, 特別邀請體感互動大師級的 Heresy老師授課哦!
上課教室: 銘傳大學桃園校區S405
上課時段: 週三上午02-04節, 第01週上課: 2013/2/20, 期中考(第9週)、6/12端午節(第17週)、期末考週(第18週),有15週授課。
授課教師: 葉正聖老師
業界教師: Heresy老師 - 第04週(3/13)教OpenNI 2, 第05週(3/20)教 NiTE 2, 第16週(6/5)期末作品展示講評
2013年5月15日 星期三
0515
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言