noteFreq object - frequency detection speed ?

Status
Not open for further replies.

emmanuel63

Well-known member
Hello,

I am using the noteFreq audio object to detect musical notes during a live flute performance. It works very well, but I am looking for a way to reduce latency to a minimum.
I have edited the analyse_notefreq.h to set the buffer size to 8. This reduces a lot the latency and this value is fine for analyzing the flute sound (no bass note).
But still it is not fast enough for live playing. Is there a way I could do a little better ?
I am using a teensy 3.6. Would it be faster with a teensy 4 ?

Thank you
Emmanuel
 
Using a faster Teensy won't make the algorithm process faster, it works by processing half the number plus one of the audio blocks (AUDIO_GUITARTUNER_BLOCKS) and then spits out the fundamental frequency. So the less "Audio Blocks" used the faster it will give you answer but then you lose the ability to detect lower frequency's. If latency is a issue, maybe look at some type of FFT techniques but I don't know of any Audio Library objects that can find the fundamental frequency with the precision of noteFreq or even close. That doesn't mean someone has something, maybe look at the software defined radio threads they do this sort of thing and could be adapted I assume for musical applications.
 
Thank you for your answer. And thank you for this tool which is really amazing. I managed to reduce the latency by setting the AUDIO_GUITARTUNER_BLOCKS to a very low value. I think that will work for my project. I have now to work on very responsive enveloppe follower using the peak object.
Emmanuel
 
Hello,
I have finished my project. It's working pretty well. Almost every note of the flute is correctly analyzed. But I am still fighting with latency. I have set AUDIO_GUITARTUNER_BLOCKS to its minimum, but I would like to do better.
I tried to edit the audioStream library by setting the audio buffer to 64 samples. Unfortunately the noteFrequence object doesn't support it. Is there a way to make noteFrequence object work with this setting ? Or is there anything I could try to gain a few milliseconds ?
Emmanuel
 
Status
Not open for further replies.
Back
Top