Heartbeat BPM and Pitch Detector Issues

Hi all. I’m not 100% green to TD but I’ve never dealt with data/audio processing in the capacity that I’m currently seeking to.

Generally, I’m seeking to create a program for a performance piece that detects heartrate BPM and Pitch, and (with as little latency as I can pull off) output that back through Ableton as Universal BPM, and MIDI. I have already soldered up a stethoscope mic to get the audio, but naturally it’s the software side of things that’s providing issues.

I have attached my heartrate BPM .toe file here as it is my first snag in the project. The issue is that I cannot figure out is how to eliminate one of the two beats of the heartbeat, as them both together is affecting the BPM (the audio file is ~92, but my output is reading ~152.

I would appreciate any help in mentally figuring out this project from anyone who has done anything similar before, and I thank you for any help you may have both on the large and small scale!

bpm detector.4.toe (42.3 KB)

Could you include the heartbeat audio asset so we can see the data?

Heartbeat_ZA02.337.mp3.zip (994.1 KB)
Sorry about that, it’s attached!

A thought, instead of using a mic, use a fingertip ecg sensor. It gives you a voltage and it’s much easier to set a threshold for a trigger.

If you want the sound, sample it and play it back using the ecg data as the trigger.
Only you will know.