Closed SeanTolstoyevski closed 1 month ago
- How can I convert the frequency values in range 0-1 returned by the
get_frequency
member function of thepitch_detector
class into normal pitch values?
get_frequency
does not return values in range 0-1. It returns the actual frequency. Have you tried running the pitch_detector
test? Here's the relevant code:
https://github.com/cycfi/q/blob/develop/test/pitch_detector.cpp#L63-L76
To convert frequency to pitch, you can use this: https://cycfi.github.io/q/q/v1.0_beta/reference/units/pitch.html
hi @djowel
Thanks very much for your answer.
I set the sps parameter for pitch_detector
incorrectly. When I replaced this to the sample rate of the input device, I started to get correct results. As far as I understand from the test codes, this means sample rate. Am I thinking right?
hi @djowel
Thanks very much for your answer.
I set the sps parameter for
pitch_detector
incorrectly. When I replaced this to the sample rate of the input device, I started to get correct results. As far as I understand from the test codes, this means sample rate. Am I thinking right?
That is correct.
If this issue has been resolved, please close. Thanks.
Hi everyone.
I have a c++ code where I listen to the sound coming from the microphone and get the frequency of the sound. I don't expect it to work perfectly, but I want to find the musical note of the sound coming out of my guitar. I used miniaudio and q for this. I use Miniaudio for audio io operations. I will share the code with you.
My questions are:
get_frequency
member function of thepitch_detector
class into normal pitch values?code
Although I don't think it's right to explain this here, I think it might be useful to share. There is currently no computer application that visually impaired musicians can use to tune their instruments. It's available for iOS and it money (using a mobile device isn't always practical). This is both a learning adventure for me and when something good happens, I want to publish it as a usable, accessible application with a gui toolset like wxWidgets. That's why your help is important :) .