Forums

basic audio dsp question

Started by amcneilly January 6, 2010
I have the following query in relation to Cross-correlation and
general Audio DSP

signalA is 512 samples @ 44100 samples/sec. length 0.0116 seconds

I take a recording and play signalA at 0.5 seconds. The recording is 1
second long or 44100 samples @ 44100 samples/sec.

When i do a Cross-correlation of signalA and the recording. i plot the
result in MatLab and i get the result i was expecting.

My query is the unexpected result i get when i attempt to shrink the
recording. I know that the chirp is produced at 0.5 seconds so i take
a clip of the recording from (0.5 - 0.6) seconds and then do a Cross-
correlation of signalA and the clip of the recording of 0.1 seconds or
4410 samples in length. the result of the plot of the Cross-
correlation is a modified horizontally compressed version of my
orignal plot. I was not expecting this. i was expecting the peak
section form my orignal plot.

Why am i receiving this result?
On Wed, 6 Jan 2010 05:31:15 -0800 (PST), amcneilly <amcneilly@gmail.com> wrote:
> I have the following query in relation to Cross-correlation and > general Audio DSP > > signalA is 512 samples @ 44100 samples/sec. length 0.0116 seconds > > I take a recording and play signalA at 0.5 seconds. The recording is 1 > second long or 44100 samples @ 44100 samples/sec. > > When i do a Cross-correlation of signalA and the recording. i plot the > result in MatLab and i get the result i was expecting. > > My query is the unexpected result i get when i attempt to shrink the > recording. I know that the chirp is produced at 0.5 seconds so i take > a clip of the recording from (0.5 - 0.6) seconds and then do a Cross- > correlation of signalA and the clip of the recording of 0.1 seconds or > 4410 samples in length. the result of the plot of the Cross- > correlation is a modified horizontally compressed version of my > orignal plot. I was not expecting this. i was expecting the peak > section form my orignal plot. > > Why am i receiving this result?
amcneilly, I'm not a DSP expert, nor do I play one on TV (Sigh!), but I'll risk exposing my ignorance. First, you mention "the chirp" in passing, but offer no real description of the signal you are working with. You might consider adding this on your next post. Second, If I had a signal that looked like the following (using 0-9 to represent amplitude): A: 000000012598877766655555444433322210000000000000000000000 and I cross-correlated it with itself, I'd expect this: AxA: 000000000090000000000000000000000000000000000000000000000 (Hey, it's a simulation, so it always works perfectly and has no noise! <grin!>) If I correlated this segment "Clip" Clip: 988777666555554444 with A I'd expect it to match up in the same location: A: 000000012598877766655555444433322210000000000000000000000 Clip: 988777666555554444 AxClip: 000000000090000000000000000000000000000000000000000000000 Maybe I missed something, What did your AxA look like, and did you expect AxClip to look like? Or did I miss something (alwasy possible)? Frank McKenney -- A striking fact of the last two years of financial trouble is how accountability has differed in the public and private spheres. On Wall Street and across the country, decades-old firms have failed, fortunes have vanished, and some former captains of finance face jail or fines. In Washington, meanwhile, most regulators and Members of Congress remain on the job, often with enhanced power. -- "Bernanke's Second Chance" / Wall Street Journal 08/26/09 -- Frank McKenney, McKenney Associates Richmond, Virginia / (804) 320-4887 Munged E-mail: frank uscore mckenney ayut mined spring dawt cahm (y'all)
On Wed, 6 Jan 2010 05:31:15 -0800 (PST), amcneilly
<amcneilly@gmail.com> wrote:

>I have the following query in relation to Cross-correlation and >general Audio DSP > >signalA is 512 samples @ 44100 samples/sec. length 0.0116 seconds > >I take a recording and play signalA at 0.5 seconds. The recording is 1 >second long or 44100 samples @ 44100 samples/sec. >
[Snipped by Lyons] Hi amcneilly, your post seems confusing the me. You have an "signalA" signal, 0.0116 seconds in length. What do "take a recording" and "play signalA at 0.5 seconds" mean? What "recording" is one second long? What does the word "recording" mean? [-Rick-]