|
|
|
08-25-2019, 02:08 PM
|
#1
|
Human being with feelings
Join Date: Dec 2011
Posts: 506
|
What algorithm does ReaTune use to detect pitch?
I'm writing a pitch correction editor script so I am interested in very accurate and fast pitch detection.
I'm currently using an EEL script derived from here for my pitch detection, which works fairly well, however it takes quite a while to extract the pitch.
ReaTune seems to be able to extract the pitch from long audio files insanely fast. Is this because the algorithm is really fast or is it just that scripts are slow?
It would be nice if there was a way to tap into the way ReaTune does pitch detection, like if there was a way in the API to get the pitch that was super optimized.
|
|
|
08-25-2019, 06:57 PM
|
#3
|
Human being with feelings
Join Date: Dec 2011
Posts: 506
|
Quote:
Originally Posted by X-Raym
|
Interesting. Thank you for the idea and code for reference! I'll take a look and play around with it as soon as I get the chance.
|
|
|
08-25-2019, 09:28 PM
|
#4
|
Human being with feelings
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,960
|
Cepstrum with modifications, Justin said. I'm sure taking FFT twice will be also fast even from ReaScript even with overlapping.
I personally didn't get good results with it, instead I used modified YIN for PitchEditor, looks slightly better than cepstrum/autocorrelation, it 80% based on link you shared.
Spectral peaks are indeed useful, but it is not a pitch detection.
Last edited by mpl; 08-25-2019 at 09:38 PM.
|
|
|
08-26-2019, 07:11 AM
|
#5
|
Human being with feelings
Join Date: Dec 2011
Posts: 506
|
Quote:
Originally Posted by mpl
Cepstrum with modifications, Justin said. I'm sure taking FFT twice will be also fast even from ReaScript even with overlapping.
I personally didn't get good results with it, instead I used modified YIN for PitchEditor, looks slightly better than cepstrum/autocorrelation, it 80% based on link you shared.
Spectral peaks are indeed useful, but it is not a pitch detection.
|
Thanks for the insight. Your modified code was actually my reference for what I have done so far. It seems to render pitch at about 3x realtime on my processor. It's really not bad, fairly quick and really accurate. It's just that ReaTune seems to do it almost instantly.
Unfortunately I'm really not up to date with spectral approaches to anything. My calculus is super rusty. I'm not so good at reading through math papers and converting to code. Do you happen to have any of your old code of when you tried using it? I'd like to take a look.
|
|
|
08-26-2019, 08:11 AM
|
#6
|
Human being with feelings
Join Date: Dec 2011
Posts: 506
|
Quote:
Originally Posted by X-Raym
You may have more efficient results using...
|
I just got around to trying this. It can get frequency almost instantly just like ReaTune, however, it doesn't seem to be very precise. It seems usable, if only there weren't octave shifts everywhere. It gets the octave wrong most of the time, sometimes by two octaves.
|
|
|
08-26-2019, 09:45 AM
|
#7
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by Alkamist
I just got around to trying this. It can get frequency almost instantly just like ReaTune, however, it doesn't seem to be very precise. It seems usable, if only there weren't octave shifts everywhere. It gets the octave wrong most of the time, sometimes by two octaves.
|
The spectral peaks don't measure the fundamental frequency of the signal. (ReaTune uses some other algorithm for the pitch detection.)
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
08-26-2019, 12:32 PM
|
#8
|
Human being with feelings
Join Date: Dec 2011
Posts: 506
|
Quote:
Originally Posted by Xenakios
The spectral peaks don't measure the fundamental frequency of the signal. (ReaTune uses some other algorithm for the pitch detection.)
|
I see. I suppose that makes sense. I'll have to do some reading and see if I can figure out how the Cepstrum algorithm works.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:04 AM.
|