Mercurial > jmeCapture
comparison src/com/aurellem/capture/examples/AdvancedAudio.java @ 22:c7a07eefaeea
started work on audio AI
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sun, 30 Oct 2011 01:19:11 -0700 |
parents | bc6fbfbbadd9 |
children | 5f616cc420dd |
comparison
equal
deleted
inserted
replaced
21:d924d7d29063 | 22:c7a07eefaeea |
---|---|
75 } | 75 } |
76 | 76 |
77 private Geometry bell; | 77 private Geometry bell; |
78 | 78 |
79 private Spatial ear1; | 79 private Spatial ear1; |
80 private Spatial ear2; | 80 //private Spatial ear2; |
81 private Spatial ear3; | 81 //private Spatial ear3; |
82 private Spatial ear4; | 82 //private Spatial ear4; |
83 | 83 |
84 | 84 |
85 private Vector3f[] path = new Vector3f[]{ | 85 private Vector3f[] path = new Vector3f[]{ |
86 // loop 1 | 86 // loop 1 |
87 new Vector3f(0, 0, 0), | 87 new Vector3f(0, 0, 0), |
144 light.setDirection(new Vector3f(0, -1, 0).normalizeLocal()); | 144 light.setDirection(new Vector3f(0, -1, 0).normalizeLocal()); |
145 light.setColor(ColorRGBA.White.mult(1.5f)); | 145 light.setColor(ColorRGBA.White.mult(1.5f)); |
146 rootNode.addLight(light); | 146 rootNode.addLight(light); |
147 | 147 |
148 ear1 = makeEar(rootNode, new Vector3f(0, 0 ,20)); | 148 ear1 = makeEar(rootNode, new Vector3f(0, 0 ,20)); |
149 ear2 = makeEar(rootNode, new Vector3f(0, 0 ,-20)); | 149 //ear2 = makeEar(rootNode, new Vector3f(0, 0 ,-20)); |
150 ear3 = makeEar(rootNode, new Vector3f(20, 0 ,0)); | 150 //ear3 = makeEar(rootNode, new Vector3f(20, 0 ,0)); |
151 ear4 = makeEar(rootNode, new Vector3f(-20, 0 ,0)); | 151 //ear4 = makeEar(rootNode, new Vector3f(-20, 0 ,0)); |
152 | 152 |
153 MotionPath track = new MotionPath(); | 153 MotionPath track = new MotionPath(); |
154 | 154 |
155 for (Vector3f v : path){ | 155 for (Vector3f v : path){ |
156 track.addWayPoint(v); | 156 track.addWayPoint(v); |
235 /** | 235 /** |
236 * Dance to the beat! This is the brain of an AI entity that | 236 * Dance to the beat! This is the brain of an AI entity that |
237 * hears it's surroundings and reacts to them. | 237 * hears it's surroundings and reacts to them. |
238 */ | 238 */ |
239 public void process(ByteBuffer audioSamples, int numSamples) { | 239 public void process(ByteBuffer audioSamples, int numSamples) { |
240 System.out.println("I'm DANCING <3"); | 240 //System.out.println("I'm DANCING <3"); |
241 entity.scale(this.scale); | 241 entity.scale(this.scale); |
242 if (this.scale == 2f){this.scale = 0.5f;} | 242 if (this.scale == 2f){this.scale = 0.5f;} |
243 else {this.scale = 2;} | 243 else {this.scale = 2;} |
244 } | 244 } |
245 | 245 |