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 sp_TopicIcon
Autocorrelation and cross-correlation
No permission to create posts
June 11, 2016
3:23 pm
Avatar
Peter
Member
Members
Forum Posts: 41
Member Since:
September 12, 2013
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

June 14, 2016
12:39 am
Avatar
W Pirkle
Admin
Forum Posts: 143
Member Since:
January 28, 2017
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

June 14, 2016
10:21 pm
Avatar
Peter
Member
Members
Forum Posts: 41
Member Since:
September 12, 2013
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: 36

Currently Online:
4 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 47

Peter: 41

Derek: 41

clau_ste: 39

Frodson: 38

Gwen: 32

EZB: 24

lppier: 23

Msaldaña: 18

Jorge: 17

Member Stats:

Guest Posters: 1

Members: 477

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 30

Topics: 483

Posts: 1877

Newest Members:

Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc

Moderators: W Pirkle: 143

Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143