There are perhaps a few different ways to do this. Here is one way:
include a counter in your script at the point where the opacity is changed so that when the number is even change the opacity, if the number is not even continue with the opacity of the last loop:
var beats;
var off_beat;
beats++;
off_beat = beats % 2;
if (off_beat) {
// code to change opacity here;
};
The logic of this code skips every other beat. disclaimer: untested.
HTH,
Mark Cain
Sarasota, FL USA