é¼»æ¯èã https://github.com/perfume-dev/example-processing ãcloneãã諸åãããªãã®processingã§Perfumeãè¸ãã¨æã£ããæ®å¿µãé³æ¥½ããªã3人ããã©ãã©ãã¦ãã ãã§ãããã¾ããããã§ãããªãæãåºããã²ã¨ã¯ãããªã«ããªãã¨æãã¾ããããã¦ã³ãã¼ããããªã½ã¼ã¹ã使ã£ã¦è¸ãããã¨ããã¾ã§æ¸ãã¦ã¿ã¾ããã
- git clone git://github.com/perfume-dev/example-processing.git
- http://processing.org/download/ ãã processing ããã¦ã³ãã¼ã
- 解åã㦠processing èµ·å
- example-processing/p5f_sample/p5f_sample.pde ãéã
- http://www.perfume-global.com/ ã®"DOWNLOAD"ããã"BVH"ã¨"SOUND"ããã¦ã³ãã¼ã
- 解åã㦠bvhãã¡ã¤ã«ã¨wavãã¡ã¤ã«ã example-processing/p5f_sample/data ã®ä¸ã«ã³ãã¼
- p5f_sample.pde ã以ä¸ã®ããã«æ¸ãæã
import ddf.minim.*; Minim minim; AudioPlayer player; BvhParser parserA = new BvhParser(); PBvh bvh1, bvh2, bvh3; public void setup() { size( 1280, 720, P3D ); background( 0 ); noStroke(); frameRate( 30 ); bvh1 = new PBvh( loadStrings( "aachan.bvh" ) ); bvh2 = new PBvh( loadStrings( "kashiyuka.bvh" ) ); bvh3 = new PBvh( loadStrings( "nocchi.bvh" ) ); minim = new Minim(this); player = minim.loadFile("Perfume_globalsite_sound.wav"); player.play(); loop(); } public void draw() { background( 0 ); camera((float) mouseX, (float) mouseY, 100.f, (float) (width/2.f), (float) (height/2.f), 0.f, 0.f, 1.f, 0.f); pushMatrix(); translate( width/2, height/2 + 100, 0); scale(-1, -1, -1); bvh1.draw( millis() ); bvh2.draw( millis() ); bvh3.draw( millis() ); popMatrix(); } void stop() { player.close(); minim.stop(); super.stop(); }
Enjoy!