Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Autocorrelation and cross-correlation
Avatar
Peter
Member
Members
June 11, 2016 - 3:23 pm
Member Since: September 12, 2013
Forum Posts: 43
sp_UserOfflineSmall Offline

Hi Will,

I am looking for a fast algorithm to measure auto- and crosscorrelation of audio signals. Do you have an idea or a good example (float would be great). Is it necessary to window the sample blocks (Hamming etc.) like in FFT ?
Another question regarding autocorrelation is:
If I have a sample buffer of let's say 512 samples is it necessary to have the following buffer to do the autocorrelation for this buffer or not?
(I presume that the lower frequency range of my measurement will be limited by the buffer size - but this is ok).

thanks for help

kind regards

Peter

Avatar
W Pirkle
Admin
June 14, 2016 - 12:39 am
Member Since: January 29, 2017
Forum Posts: 470
sp_UserOfflineSmall Offline

Hi Peter

I don't have much experience in auto/cross correlation with moving signals (music signals), only fixed buffers of captured data for analysis (on a project I worked on involving a video geometry correction IC for National Semiconductor) so windowing was not needed. I am guessing you are doing beat or pitch detection here and unfortunately I don't have any C++ code ready for that. You can also do autocorrelation with FFT and IFFTs so on a moving signal I would guess that windowing would be appropriate. Sorry I don't have a better answer for you.

- Will

Avatar
Peter
Member
Members
June 14, 2016 - 10:21 pm
Member Since: September 12, 2013
Forum Posts: 43
sp_UserOfflineSmall Offline

Hi Will

thanks for your reply. I found a small peace of code wich seems to work. Your guess is right, I use autocorrelation to find out when a trigger signal (2k eg.) is in my incoming audio buffer. I don't have much experience in autocorrelation either - and my buffer is small to keep the delay low - so I have to play a little bit with my settings. If you are interested in this subject - I spotted an interesting PDF in the net : YIN, a fundamental frequency estimator (easy to google). I read that Paul Stoffregen (from teensy) uses this algorithm for his pitch estimation routine.

kind regards

Peter

Forum Timezone: America/New_York

Most Users Ever Online: 152

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 43

TheSmile: 43

clau_ste: 39

JimmyM: 33

Gwen: 32

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 641

Moderators: 1

Admins: 4

Forum Stats:

Groups: 13

Forums: 40

Topics: 678

Posts: 2638

Newest Members:

IgorVish, Arjuna, TomMilne, BaiJin, MarioG, caozbm, audio_coder, coder, Levioter, VariableCook

Moderators: W Pirkle: 470

Administrators: Tom: 74, JD Young: 80, Will Pirkle: 0, W Pirkle: 470