BPM detector for iOS