version 4: counting peaks like version 3 + smoothing BPM by calculating power