title: Processing Beat Detecting
body: <p>I am using processing and the minim library and trying to create a 3D real-time visualisation for live audio input.</p>
  
  <p>i have boxes drawn and is responding to the kick, snare , and hi hats of the audio input.  I am looking to make these boxes rotate also responding to the kick ect.  how could i make these boxes rotate?</p>
  
  
  
  <pre class="lang-java prettyprint-override"><code>if ( beat.isKick() ) kickSize = 200;
  if ( beat.isSnare() ) snareSize = 250;
  if ( beat.isHat() ) hatSize = 200;
  translate ( width/4, height/4);
  box(kickSize);
  translate( - width/4, - height/4);
  
  translate ( width/2, height/3);
  sphere(snareSize);
  translate( - width/2, - height/3);
  
  translate ( 3*width/4, height/4);
  box(hatSize);
  translate( - 3*width/4, - height/4);
  
  
  kickSize = constrain(kickSize * 0.95, 1, 32);
  snareSize = constrain(snareSize * 0.95, 1, 32);
  hatSize = constrain(hatSize * 0.95, 1, 32);
  </code></pre>