Does it work?
What problems do you have?
I suggest to println() the values in.right.get(i) and in.left.get(i)) - I doubt the mic gives you good values....
minim also has a beat detection
http://code.compartmental.net/minim/javadoc/ddf/minim/analysis/BeatDetect.html
coming from
http://code.compartmental.net/tools/minim/