vadymmarkov / Beethoven

:guitar: A maestro of pitch detection.
https://github.com/vadymmarkov
Other
824 stars 146 forks source link

Individual note tracking #48

Closed marcosgriselli closed 4 years ago

marcosgriselli commented 7 years ago

Hi @vadymmarkov, first of all, thanks for this awesome library 🎹 🎉! It's been really helpful start understanding how pitch detection works.

My issue is that I'm trying to get individual notes in a sequence without one note being recognized multiple times. If I play say C4 for 1 second I'll get 5/6 calls to PitchEngineDelegate's func pitchEngineDidReceivePitch(_ pitchEngine: PitchEngine, pitch: Pitch).

Is there a way to avoid this? Or some sort of comparison to detect if the exact same note is being played without interruptions? The goal is to be able to play a few individual notes (can be the same or different notes) and get the exact output like: A - A - C# - F - E

vadymmarkov commented 7 years ago

Hi @marcosgriselli and thanks for a great feedback! I don't have any solution on top of my head right now, but as a workaround you could try to track "duplicates" with some manually set delay and display a new note only if it's different from the previous one.

eiji110007 commented 6 years ago

Hi @marcosgriselli, I have the same needs as you. Have you solved this problem? Thank you

scubax07 commented 4 years ago

Hello guys, has anyone solved this problem yet? And thanks @vadymmarkov for this amazing library.

marcosgriselli commented 4 years ago

@scubax07 as @vadymmarkov suggested we ended up tracking pitches and manually detecting changes. I'll close this issue since it's not a library problem.